2022-09-01から1ヶ月間の記事一覧
以下の文を記載すると #include <stdio.h> int main(int argc, char *argv[]) { printf("%i\n", argc); printf("%s\n", argv[0]); printf("%s\n", argv[1]); printf("%s\n", argv[2]); } 結果が以下のように出力される $ ./hello2 1 a 3 4 ./hello2 1 a</stdio.h>
以下のif文を記載すると #include <stdio.h> int main(void) { int n = -1; if (1) { puts("ture1"); } if (0) { puts("ture0"); } if (-1) { puts("ture-1"); } } 結果が以下のように出力される $ ./hello1 ture1 ture-1</stdio.h>