Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Created January 20, 2012 12:02
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/1647088 to your computer and use it in GitHub Desktop.
Save kenjiskywalker/1647088 to your computer and use it in GitHub Desktop.
format2.c
#include <stdio.h>
int main() {
char string[10];
int NUM1 = -10;
unsigned int NUM2 = 1000;
strcpy(string, "hogeee");
printf("[NUM2のフィールド幅指定] 3: '%3u', 10: '%10u', 08: '%08u'\n", NUM2, NUM2, NUM2);
printf("[hogeeee] %s ADDRESS: '%08x'\n", string, string);
printf("[NUM1]のアドレス: '%08x'\n", &NUM1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment