#include <stdio.h>
#define SIZEOF(var) ((size_t)(&(var)+1) - (size_t)(&(var)))
main( )
{
int x;
printf ("The size of x is %d\n", SIZEOF(x) );
}
This blog provides some ready-made tips, tricks, tweaks & interview questions-answers on C, C++, Perl, Shell Scripting and UNIX Commands.
No comments :
Post a Comment