C program to understand the Sizeof operator | sizeof operator example program

Spread the love

Program :

int main(void)
int var;
printf(“Size of int=%un”,sizeof(int));
printf(“Size of float=%un”,sizeof(float));
printf(“Size of var=%un”,sizeof(var));
printf(“Size of an integer constant=%un”,sizeof(45));
return 0;

Output :

Note : This program is compiled on MAC with GCC compiler. if you try to compile it on your PC or other compiler than GCC, the output may different.

Related Programs :

finding Largest of two numbers using conditional operator in C.
C program to calculate the simple Interest,
100 + More C programs

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply