am i doing this right? im assigning random values to Matrix a & b using a pointer, then trying to print out the first value in matrix a...not doing something right, i am getting segmentation fault
Oh, it doesn't cause your problem, but it will cause problems:
Put srand at the top of main. It needs to be called exactly once in a code. Any more and you'll start to see non-random behavior.