I've initialized a char** and allocated space using malloc in a loop
char *argv[SIZE];
for( i=0 ; i < SIZE; i++ ){
argv[i] = (char *) malloc(64);
printf("ADDRESS %d Index %d\n",argv[i],i);
}
the printf shows addresses going up by 160, instead of 64, is that normal?
and lets say I pointed second index to null
argv[1] = NULL;
they I try to make it point to its allocated memory location by
argv[1] = arg[0] + 64;
which crashes the program after I try to free in loop
free(argv[i]);
so how can I make it point to its original location? where does the 160 come from?
thanks in advance