Skip to content

Instantly share code, notes, and snippets.

@kusma
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kusma/c44fb2a1d2364fee41e1 to your computer and use it in GitHub Desktop.
Save kusma/c44fb2a1d2364fee41e1 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void foo(signed int v)
{
printf("signed int: %x\n", v);
}
void foo(unsigned int v)
{
printf("unsigned int: %x\n", v);
}
void foo(signed long v)
{
printf("signed long: %lx\n", v);
}
void foo(unsigned long v)
{
printf("unsigned long: %lx\n", v);
}
int main()
{
foo(2147483647);
foo(2147483648);
foo(0x80000000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment