Skip to content

Instantly share code, notes, and snippets.

@JeOam
Created November 7, 2013 04:13
Show Gist options
  • Save JeOam/7348867 to your computer and use it in GitHub Desktop.
Save JeOam/7348867 to your computer and use it in GitHub Desktop.
Type Constant Examples NSLog chars
char 'a','\n' %c
short int - %hi, %hx, %ho
unsigned short int - %hu, %hx, %ho
int 12, -97, oxFFE0, 0177 %i, %x, %o
unsigned int 12u, 100u, 0Xffu %u, %x, %o
unsigned long int 12UL, 100ul, 0xffeeUL %li, %lx, %lo
long long int 0xe5e5e5e5LL, 500ll %lli, %llx, %llo
unsigned long long int 12ull, oxffeeull %llu, %llx, %llo
float 12.34f, 3.1e-5f, 0x1.5p10, 0x1p-1 %f, %e, %g, %a
double 12.34, 3.1e-5, 0x.1p3 %f, %e, %g, %a
long double 12.34L, 3.1e-5l %Lf, %Le, %Lg
id nil %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment