Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Created January 20, 2012 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenjiskywalker/1646997 to your computer and use it in GitHub Desktop.
Save kenjiskywalker/1646997 to your computer and use it in GitHub Desktop.
format.c
#include <stdio.h>
int main() {
char string[10];
int NUM1 = -10;
unsigned int NUM2 = 100;
strcpy(string, "hogeee");
// anything format ext
printf("[NUM1] 10進数:%d, 16進数:%x, 符号なし10進数:%u\n", NUM1, NUM1, NUM1);
printf("[NUM2] 10進数:%d, 16進数:%x, 符号なし10進数:%u\n", NUM2, NUM2, NUM2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment