Skip to content

Instantly share code, notes, and snippets.

@honux77
Created January 3, 2013 11:26
Show Gist options
  • Select an option

  • Save honux77/4442803 to your computer and use it in GitHub Desktop.

Select an option

Save honux77/4442803 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <limits.h>
int main()
{
char c = 'a';
int i = -10;
long l = 500L;
unsigned long long ll= 20L;
printf("size of char is %d", sizeof(c));
printf(",int value= %d, cvalue= %c.\n", c, c);
printf("size of int is %d, value = %d, uvalue = %u\n", sizeof(i), i, i);
printf("int max value = %d\n", INT_MAX);
printf("size of long is %d, value = %ld.\n", sizeof(l), l);
printf("long max value = %d\n", LONG_MAX);
printf("size of long long is %d, uvalue = %llu\n", sizeof(ll), ll);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment