* Write a Program to print find the sizeof the int data type.
#include<stdio.h> #include<conio.h> void main() { int x; clrscr(); printf(“integer size=%d”,sizeof(x)); getch(); } |
Output:-
integer size=2 |
* Write a Program to print find the sizeof the all data types.
#include<stdio.h> #include<conio.h> void main() { int a; float b; char c; double d; clrscr(); printf(“integer size=%d\n”,sizeof(a)); printf(“float size=%d\n”,sizeof(b)); printf(“char size=%d\n”,sizeof(c)); printf(“double size=%d\n”,sizeof(d)); getch(); } |
Output:-
integer size=2 float size=4 char size =1 double size=8 |
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Post a Comment