C Program to Demonstrate the Working of Keyword long

Source Code


#include <stdio.h>
int main(){
int a;
long int b; /* int is optional. */
long long int c; /* int is optional. */
printf
("Size of int = %d bytes\n",sizeof(a));
printf
("Size of long int = %ld bytes\n",sizeof(b));
printf
("Size of long long int = %ld bytes",sizeof(c));
return 0;
}
Output
Size of int = 4 bytes
Size of long int = 4 bytes
Size of long long int = 8 bytes

0 comments:

Post a Comment

My Instagram