This is probably a very elementary problem, but I cannot find the answer anywhere, and this is the first time I\'ve had the problem after several weeks of programming in C. In e
Try
printf("size is %d", size);
& gives you the memory location (address) of a variable.
&
printf("size is %d", &size);
So, the above will print the memory location(address) of size, not the value stored in size.
size