C program to understand the Sizeof operator | sizeof operator example program
Program :
#include<stdio.h>
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