Tuesday, 27 August 2013

c program to demonstrate sizeof() function

#include<stdio.h>
#include<conio.h>
int main()
{
    int a;
    long int b;
    long long int k;
    float c;
    double d;
    long double e;
    long g;
   
    printf("int=%d\n",sizeof(a));
    printf("long int=%d\n",sizeof(b));
    printf("float =%d",sizeof(c));
    printf("\ndouble=%d",sizeof(d));
    printf("\nlong double =%d",sizeof(e));
    printf("\nlong-long-int=%d",sizeof(k));
    printf("\nlong=%d",sizeof(g));
   
   
    getch();
    return 0;
}

No comments:

Post a Comment