Pages

Wednesday, March 26, 2014

C Program to demonstrate use of sizeof() operator

/* use of size of operator*/
#include<stdio.h>
#include<stdlib.h>
int main()
{
    char c;
    int i;
    float f;
    double d;
    printf("memory allocate by character=%u",sizeof(c));
    printf("\n memory allocate by integer=%u",sizeof(i));
    printf("\n memory allocate by float=%u",sizeof(f));
    printf("\n memory allocate by double=%u",sizeof(d));
    system ("pause");
    return 0;
}

No comments:

Post a Comment