第5章クイズ

クイズ1

次の関数定義の1行目について、正しい説明はどれですか。

double average_of(int total, int count) {

クイズ2

次のプログラムの出力はどれですか。

#include <stdio.h> void show(void) { printf("B"); } int main(void) { printf("A"); show(); printf("C\n"); return 0; }

クイズ3

次のプログラムの出力はどれですか。

#include <stdio.h> int add_bonus(int score) { score = score + 5; return score; } int main(void) { int score = 70; add_bonus(score); printf("%d\n", score); return 0; }

クイズ4

main より下に定義した関数を main の中から呼びたいとき、プロトタイプ宣言が必要になる理由はどれですか。

クイズ5

次のプログラムの出力はどれですか。

#include <stdio.h> int make_total(void) { int total = 100; return total; } int main(void) { int total = 0; make_total(); total = total + 5; printf("%d\n", total); return 0; }

未回答の問題は、不正解として正解と解説のみ表示します

ログインが必要です

クイズに回答するにはログインしてください。