Skip to content

Instantly share code, notes, and snippets.

@kokosabu
Last active August 29, 2015 14:27
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 kokosabu/0473e607c28d6b6d97ff to your computer and use it in GitHub Desktop.
Save kokosabu/0473e607c28d6b6d97ff to your computer and use it in GitHub Desktop.
/*
register int a; <- コンパイルできない
auto int b; <- コンパイルできない
*/
static int c; /* ローカル変数と呼んでる */
extern int d; /* グローバル変数を他で使用する場合の宣言。 */
/* 普段はヘッダファイルに記載して、 */
/* インクルードしてる */
int d; /* グローバル変数と呼んでる */
int main()
{
register int e; /* 使わない */
auto int f; /* 使わない(普段はauto省略) */
static int g; /* たまに使う。 */
/* 他の人に伝える時は、 */
/* 関数内staticって呼んでると思う */
extern int h; /* 使わない */
int i; /* オート変数と呼んでる */
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment