Skip to content

Instantly share code, notes, and snippets.

@atton
Created July 14, 2014 02:11
Show Gist options
  • Save atton/31728e4bf4824e54a464 to your computer and use it in GitHub Desktop.
Save atton/31728e4bf4824e54a464 to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main(void) {
char hoge[5] = {'f', 'u', 'g', 'a', '\0'};
printf("%s\n", hoge);
return 0;
}
#include<stdio.h>
int main(void) {
char* hoge = "fuga";
printf("%s\n", hoge);
return 0;
}
#include<stdio.h>
int main(void) {
char *hoge = "%p %p";
char *fuga = "piyo";
printf(hoge, fuga);
return 0;
}
#include<stdio.h>
int main(void) {
char *hoge = "%p";
char *fuga = "piyo";
printf(hoge, fuga);
return 0;
}
#include<stdio.h>
int main(void) {
char *hoge = "%p";
printf(hoge);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment