Discuss Question on 2d array. in the C Programming forum on Dev Shed. Question on 2d array. C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
Time spent in forums: 2 Weeks 4 Days 2 h 38 m 46 sec
Reputation Power: 243
First, move your srand() outside your loop! You are reinitializing the random number generator with each loop, thus (since time will likely be an invariant for the duration of the execution) filling each row with the same numbers.
Second, howzatbout tossing in a linefeed after your for j loop?