トップページ > キーワード検索 > #endif
C言語規格
C言語(その他)
プログラム
その他
#endif
機能 前処理終了指令を表す。
前処理終了指令、判断指令・代替指令(#if#elif#else#ifdef#ifndef)の終わりを表す。
※ 翻訳(コンパイル)時に処理される
定義 #endif 制御式
実装例
#include <stdio.h>

#if 1
#define A 123  /* 組み込まれる   */
#elif 0
#define A 456  /* 組み込まれない */
#else
#define A 0    /* 組み込まれない */
#endif

int main(void)
{
    printf("%d\n", A);
    
    return 0;
}
実行結果
123





inserted by FC2 system