/* C Program to find SIZE of different data types */
#include<stdio.h>
#include<conio.h>
int a;
float b;
double c;
char ch;
void main()
{
printf("\nEnter a integer, a float, a double and a character: ");
scanf("%d%f%lf%c",&a,&b,&c,&ch);
printf("SIZE of int = %d",sizeof(a));
printf("\nSIZE of float = %d",sizeof(b));
printf("\nSIZE of double = %d",sizeof(c));
printf("\nSIZE of char = %d",sizeof(ch));
getch();
No comments:
Post a Comment