sizeof() operator, Returns the size of a variable.
C Programming Language Operators and Enums in C Language (Article) Operators and Enums in C Language (Program)
1058Program:
#include int main() { int a, e[10]; float b; double c; char d; printf("Size of int=%lu bytes\n",sizeof(a)); printf("Size of float=%lu bytes\n",sizeof(b)); printf("Size of double=%lu bytes\n",sizeof(c)); printf("Size of char=%lu byte\n",sizeof(d)); printf("Size of integer type array having 10 elements = %lu bytes\n", sizeof(e)); return 0; }
Output:
Size of int=4 bytes Size of float=4 bytes Size of double=8 bytes Size of char=1 byte Size of integer type array having 10 elements = 40 bytes Press any key to continue . . .
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.