hi i have the following c code
int *a;
size_t size = 2000*sizeof(int);
a = (int *) malloc(size);
which works fine... but now if i have the following
char **b = malloc(2000*sizeof *b);
where every element of b has different length...
now, how is it possible to do the same thing for b as i did for a, i.e. is the below code would be correct?
char *c;
size_t size = 2000*sizeof(char *);
c = (char *) malloc(size);
thanks in advance!