C言語の基本概念 - 1. 論理型と演算子

論理型と論理演算 <stdbool.h> ヘッダーファイルをインクルードする これにより bool 型および true、false 定数が利用可能になる 例1: #include <stdio.h> #include <stdbool.h> int main() { bool b = 6 > 5; bool t = true; printf("%d\n", t); t = 2; printf("%d\n", t); printf("%d\n&quot ...

7月18日 17:45 投稿