Sizeof Operator

#include
#include
/* sizeof operator */
main()
{
int a;
float c;
double d;
/* multiple initialization */
clrscr();
printf("\n Integer data type takes %d bytes in memory !",sizeof a);
printf("\n Float data type takes %d bytes in memory !",sizeof c);
printf("\n Double data type takes %d bytes in memory !",sizeof d);

getch();
}

No comments:

Post a Comment