题目内容

What is the output of the following statements, given that the variable Num1=3 and the variable Num2=5?printf(“The sum of %d + %d is 6.”, Num1, Num2)()

A. The sum of 3 and 5 is 8
B. The sum of 3 and 5 is 6
C. The sum of Num1 and Num2 is 8
D. The sum of Num1 and Num2 is 6

查看答案
更多问题

How many times will the following program print hello?i = 1;while (i <= 10){ puts(“hello”); }()

A. 10
B. 8
C. an infinite number of times
D. 0

What is the output of code corresponding to the following program segment if Age=18?if(age>=18) printf(“You are eligible to vote.”);else vote = age-18; printf(“You can vote in %d years”, vote)()

A. You are eligible to vote
B. You can vote in 18 years
C. You can eligible to vote.Your can vote in 0 years
D. You can vote in 0 years

The program segment int counter = 1;do {printf(“%i”, counter);} while(counter <= 10); will__()

A. print the numbers 1 through 11
B. print the numbers 1 through 10
C. print the numbers 1 through 9
D. cause a syntax error

Which of the following is not specified by the following code segment:for(c = 1; c <= 10; c++)()

A. initial value of the loop counter
B. loop continuation test
C. increment of the loop counter
D. body statement of the loop

答案查题题库