Tuesday, 17 May 2011

To find sizeof structure without using sizeof operator

#include<stdio.h>
#include<conio.h>
struct node
{
int a,b;
float c;
char d;
}s;
void main()
{
printf("%d",(&s.d+1)-(&s.a));
getch();
}

No comments:

Post a Comment