vietjack.com

400 Câu hỏi trắc nghiệm lập trình C/C++ có đáp án (Phần 4)
Quiz

400 Câu hỏi trắc nghiệm lập trình C/C++ có đáp án (Phần 4)

A
Admin
50 câu hỏiIT TestTrắc nghiệm tổng hợp
50 CÂU HỎI
1. Nhiều lựa chọn

Which of the following is the correct usage of condition operators used in C?

A. a>b? c = 20 : c = 21;

B. a>b? c = 20;

C. max = a>b? a>c?a:c:b>c?b:c;

D. return (a>b)?(a:b);

Xem giải thích câu trả lời
2. Nhiều lựa chọn

The expression of the right hand side of || operators does not get evaluated if the left hand side determines the outcome.

A. True

B. False

Xem giải thích câu trả lời
3. Nhiều lựa chọn

Which of the following correctly shows the hierarchy of arithmetic operator in C?

A. / + * –

B. * – / +

C. + – / *

D. / * + –

Xem giải thích câu trả lời
4. Nhiều lựa chọn

Which of the following is the correct order of evaluation for the below expression? z = x + y * z / 4 % 2 – 1;

A. * / % + – =

B. = * / % + –

C. / * % – + =

D. * % / – + =

Xem giải thích câu trả lời
5. Nhiều lựa chọn

What will be the output of the program? Media VietJack

A. 1 1 1 1

B. 1 0 0 1

C. 1 0 1 1

D. Other

Xem giải thích câu trả lời
6. Nhiều lựa chọn

What will be the output of the program? Media VietJack

A. 1 0 1

B. 1 1 1

C. 0 0 0

D. 0 1 0

Xem giải thích câu trả lời
7. Nhiều lựa chọn

What will be the output of the program? Media VietJack

A. z = 0

B. z = 1

C. z = 4

D. z = 3

Xem giải thích câu trả lời
8. Nhiều lựa chọn

Every operators has an Associativity

A. Yes

B. No

Xem giải thích câu trả lời
9. Nhiều lựa chọn

What will be the output of the program? Media VietJack

A. 4 2 -1 1

B. 4 3 0 1

C. 3 2 -1 1

Xem giải thích câu trả lời
10. Nhiều lựa chọn

What is output of the program? Media VietJack

A. 4 3 0 0

B. 3 3 0 1

C. 4 2 0 0

D. None of these

Xem giải thích câu trả lời
11. Nhiều lựa chọn

Are the following two statement same? Media VietJack

A. Yes

B. No

Xem giải thích câu trả lời
12. Nhiều lựa chọn

What will be the output of the program? Media VietJack

A. 6

B. 3

C. 12

D. Complier error

Xem giải thích câu trả lời
13. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. 0 4 1

B. 1 4 1

C. 4 4 1

D. None of these

Xem giải thích câu trả lời
14. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. 4 4

B. 3 4

C. 2 2

D. 2 3

Xem giải thích câu trả lời
15. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. c = 1

B. c = 29

C. c = 10

D. c = 19

Xem giải thích câu trả lời
16. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. 4 3 2

B. 4 3 3

C. 2 3 2

D. 2 3 3

Xem giải thích câu trả lời
17. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. 20

B. 30

C. 40

D. 10

Xem giải thích câu trả lời
18. Nhiều lựa chọn

What is output of the program? Media VietJack

A. 4

B. 3

C. Complier error

D. None of above

Xem giải thích câu trả lời
19. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. 3, 0, 0,

B. 3, 3, 3,

C. 3, garbage, garbage

D. Another

Xem giải thích câu trả lời
20. Nhiều lựa chọn

What value is returned by function func()? Media VietJack

A. 5

B. 0

C. Exception

D. Another

Xem giải thích câu trả lời
21. Nhiều lựa chọn

What will be output when you will execute following c code? Media VietJack

A. mmmm aaaa nnnn

B. mmm aaa nnn

C. mmmm aaa nnn

D. Another

Xem giải thích câu trả lời
22. Nhiều lựa chọn

What will be output when you will execute following c code? Media VietJack

A. AAAAAABCDEF

B. AAAAAABCDE

C. ABCDEF

D. Another

Xem giải thích câu trả lời
23. Nhiều lựa chọn

What gets printed? Media VietJack

A. 3

B. 4

C. 5

D. 6

Xem giải thích câu trả lời
24. Nhiều lựa chọn

What is output? Media VietJack

A. Hello

B. Nothing

C. Complier Error

D. Run time error

Xem giải thích câu trả lời
25. Nhiều lựa chọn

What is output? Media VietJack

A. 012

B. Run time error

C. 3

D. 2

Xem giải thích câu trả lời
26. Nhiều lựa chọn

What is output? Media VietJack

A. Complie time error

B. Infinite Loop

C. Nothing

Xem giải thích câu trả lời
27. Nhiều lựa chọn

What is output? Media VietJack

A. In for loop

B. After loop

C. Complie error

Xem giải thích câu trả lời
28. Nhiều lựa chọn

What is output? Media VietJack

A. True

B. False

C. Complie Error

D. Another

Xem giải thích câu trả lời
29. Nhiều lựa chọn

What is output ? Media VietJack

A. 5, 5

B. 10, 10

C. Syntax error

Xem giải thích câu trả lời
30. Nhiều lựa chọn

What is output? Media VietJack

A. a = 5,b = 5

B. a = 4,b = 4

C. a = 5,b = 0

D. Another

Xem giải thích câu trả lời
31. Nhiều lựa chọn

What is output ? Media VietJack

A. Hello

B. Hello is printed 3 times

C. Hello is prined 4 times

D. Hello is printed 5 times

Xem giải thích câu trả lời
32. Nhiều lựa chọn

What is output ? Media VietJack

A. Hello

B. Hello is printed 3 times

C. Hello is prined 4 times

D. Hello is printed 5 times

Xem giải thích câu trả lời
33. Nhiều lựa chọn

What is output? Media VietJack

A. 1 2 3

B. 0 1 2 3

C. 0 1 2

Xem giải thích câu trả lời
34. Nhiều lựa chọn

What is output ? Media VietJack

A. 12345

B. 123456

C. 6

D. 1234

Xem giải thích câu trả lời
35. Nhiều lựa chọn

What is output? Media VietJack

A. 99 99 99

B. Complier Error

C. 1

Xem giải thích câu trả lời
36. Nhiều lựa chọn

How many times will “vncoding” is printed on screen? Media VietJack

A. 10

B. 11

C. Infinite

Xem giải thích câu trả lời
37. Nhiều lựa chọn

What is output? Media VietJack

A. 1 3

B. 1 2

C. Không in ra kí tự nào

Xem giải thích câu trả lời
38. Nhiều lựa chọn

What is output? Media VietJack

A. Start End Start End

B. Start Start Start

C. Start Start Start Start

Xem giải thích câu trả lời
39. Nhiều lựa chọn

What is output of the following code? Media VietJack

A. 1 2 3 4 5 6 7 8 9

B. 3 4 5 6 7 8 9

C. 4 5 6 7 8 9

D. 4 5 6 7 8 9 10

Xem giải thích câu trả lời
40. Nhiều lựa chọn

What is output? Media VietJack

A. Infinite loop

B. 35

C. 38

D. 39

Xem giải thích câu trả lời
41. Nhiều lựa chọn

What is output? Media VietJack

A. 6, 5, 4, 3, 2, 1,

B. 6, 5, 4, 3, 2, 1, 0,

C. Complier Error

D. Infinite loop

Xem giải thích câu trả lời
42. Nhiều lựa chọn

What is output? Media VietJack

A. 0

B. -1

C. -2

D. -3

Xem giải thích câu trả lời
43. Nhiều lựa chọn

What is output? Media VietJack

A. 0

B. 2

C. 3

D. -4

Xem giải thích câu trả lời
44. Nhiều lựa chọn

What is output? Media VietJack

A. print i and j from 0 till 4

B. print i and j from 0 till 5

C. print i from 0 to 4, print j from 0 to 5

D. Complier Error

Xem giải thích câu trả lời
45. Nhiều lựa chọn

What gets printed? Media VietJack

A. 5

B. 6

C. 7

D. Another

Xem giải thích câu trả lời
46. Nhiều lựa chọn

What gets printed? Media VietJack

A. Value of x is 0

B. Value of x is not 0

C. Error

Xem giải thích câu trả lời
47. Nhiều lựa chọn

What gets printed? Media VietJack

A. 14,18,

B. 16,20,

C. 16,21

Xem giải thích câu trả lời
48. Nhiều lựa chọn

What gets printed ? Media VietJack

A. -1

B. 0

C. 1

D. Complier error

Xem giải thích câu trả lời
49. Nhiều lựa chọn

What is output ? Media VietJack

A. Hello

B. Hi

C. Complier error

Xem giải thích câu trả lời
50. Nhiều lựa chọn

What is output? Media VietJack

A. x=0 y=1

B. x=0 y=0

C. Error syntax

Xem giải thích câu trả lời
© All rights reserved VietJack