Menu BAR

FEEL FREE TO ASK ANY PROGRAM and please mention any error if you find it

16 Jan 2013

C program to find size of DATA TYPES

Q.) Write a simple program to find the size of different basic data types in C  


#include<stdio.h>
 #include<conio.h>

int main( ) 
{
int i;
char ch ;
float f;
long l;

printf("\n\t Size of different data types as following \n") ;

printf("\n Size of character ch is %d", sizeof(ch));

printf("\n Size of integer i is %d", sizeof(i));

printf("\n Size of float f is %d", sizeof(f));

printf("\n Size of long l is %d", sizeof(l));

return 0;

}

No comments:

Post a Comment