Showing posts with label WAP to find size of any variable. Show all posts
Showing posts with label WAP to find size of any variable. Show all posts

SIZE OF VARIABLE

WAP to find size of any variable

void main()

{

int a;

float b;

double c;

char ch;

long d;

char nm[10];

clrscr();

printf("\nInt size is \t:%d", sizeof (a));

printf("\nFloat size is \t:%d", sizeof (b));

printf("\nDouble size is \t:%d", sizeof (c));

printf("\nChar size is \t:%d", sizeof (ch));

printf("\nLong size is \t:%d", sizeof (d));

printf("\nString size is \t:%d", sizeof (nm));

getch ();

}


Labels