Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save scratchyourbrain/a69a726d4d613d243df0 to your computer and use it in GitHub Desktop.
Save scratchyourbrain/a69a726d4d613d243df0 to your computer and use it in GitHub Desktop.
C Program to implement sizeof operator
#include <stdio.h>
int main()
{
int a;
float b;
double c;
char d;
printf("Size of int: %d bytes\n",sizeof(a));
printf("Size of float: %d bytes\n",sizeof(b));
printf("Size of double: %d bytes\n",sizeof(c));
printf("Size of char: %d byte\n",sizeof(d));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment