-
-
Save knatten/855938db29a0ec1611cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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(signed long long v) | |
{ | |
printf("signed long long: %llx\n", v); | |
} | |
void foo(unsigned long v) | |
{ | |
printf("unsigned long: %lx\n", v); | |
} | |
void foo(unsigned long long v) | |
{ | |
printf("unsigned long long: %llx\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