#include <stdio.h>
int main()
{
int len = 100;
char myarr[len];
char *ptr;
ptr = myarr;
printf( "sizeof(myarr) = %d\n", sizeof(myarr) );
printf( "sizeof(ptr) = %d\n", sizeof(ptr) );
return 0;
}
What will this little program print? ;)
Stay tuned for the answer!
Added 24 October 2010:
Oops. I've been so busy I fogot to post a follow up. Anyway, you can easily verify what the answer will be by compiling and running.
No comments:
Post a Comment