home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_06
/
9n06018a
< prev
next >
Wrap
Text File
|
1991-02-17
|
337b
|
25 lines
#include <stdio.h>
#include <stdlib.h>
main()
{
int rows = 0;
long (*pl)[10];
while (rows < 1) {
printf("Enter number of 10 element rows: ");
scanf("%4d", &rows);
}
pl = malloc(rows * sizeof(*pl));
if (pl == NULL) {
printf("malloc failed\n");
exit(1);
}
pl[0][2] = 1234;
pl[0][9] = 9876;
}