Skip to content

Instantly share code, notes, and snippets.

@tamago324
Created January 17, 2018 13:10
Show Gist options
  • Save tamago324/b8753f2bffb27c31392c39cd2805ad40 to your computer and use it in GitHub Desktop.
Save tamago324/b8753f2bffb27c31392c39cd2805ad40 to your computer and use it in GitHub Desktop.
sizeof演算子を使ってみた。戻り値の型が unsigned long 型ということに注意?
// sizeof_test.c
#include <stdio.h>
int main(int argc, char *argv[]){
char str1[] = "Hello!\n";
int size = sizeof str1;
printf("%d\n", size);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment