program to us size of operator in C Language
#include <stdio.h>
int main()
{
int var;
printf("size of int=%u\n", sizeof(int));
printf("size of float=u\n", sizeof(float));
printf("size of var=%u\n", sizeof(var));
printf("size of an integer constant =%u\n", sizeof(45));
return 0;
}
output
size of int =4
size of float=u
size of var = 4
size of an integer constant =4
Step / Description
- Declare integer variable
"var"
printf
inbuild function to display size of integer variable"var"
using another inbuilt function"
"size of()" printf
inbuild function to display size of float variable"var"
using another inbuild function"size of()"
printf
inbuild function to display size of var variable"var"
using another inbuild function"size of()"
printf
inbuild function to display size of an integer constant variable"var"
using another inbuild function"size of()"