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);

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

3. Nhiều lựa chọn

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

A. / + * –

B. * – / +

C. + – / *

D. / * + –

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. * % / – + =

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

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

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

8. Nhiều lựa chọn

Every operators has an Associativity

A. Yes

B. No

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

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

11. Nhiều lựa chọn

Are the following two statement same? Media VietJack

A. Yes

B. No

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

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

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

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

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

17. Nhiều lựa chọn

What will be output of the program? Media VietJack

A. 20

B. 30

C. 40

D. 10

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

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

20. Nhiều lựa chọn

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

A. 5

B. 0

C. Exception

D. Another

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

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

23. Nhiều lựa chọn

What gets printed? Media VietJack

A. 3

B. 4

C. 5

D. 6

24. Nhiều lựa chọn

What is output? Media VietJack

A. Hello

B. Nothing

C. Complier Error

D. Run time error

25. Nhiều lựa chọn

What is output? Media VietJack

A. 012

B. Run time error

C. 3

D. 2

26. Nhiều lựa chọn

What is output? Media VietJack

A. Complie time error

B. Infinite Loop

C. Nothing

27. Nhiều lựa chọn

What is output? Media VietJack

A. In for loop

B. After loop

C. Complie error

28. Nhiều lựa chọn

What is output? Media VietJack

A. True

B. False

C. Complie Error

D. Another

29. Nhiều lựa chọn

What is output ? Media VietJack

A. 5, 5

B. 10, 10

C. Syntax error

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

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

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

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

34. Nhiều lựa chọn

What is output ? Media VietJack

A. 12345

B. 123456

C. 6

D. 1234

35. Nhiều lựa chọn

What is output? Media VietJack

A. 99 99 99

B. Complier Error

C. 1

36. Nhiều lựa chọn

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

A. 10

B. 11

C. Infinite

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

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

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

40. Nhiều lựa chọn

What is output? Media VietJack

A. Infinite loop

B. 35

C. 38

D. 39

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

42. Nhiều lựa chọn

What is output? Media VietJack

A. 0

B. -1

C. -2

D. -3

43. Nhiều lựa chọn

What is output? Media VietJack

A. 0

B. 2

C. 3

D. -4

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

45. Nhiều lựa chọn

What gets printed? Media VietJack

A. 5

B. 6

C. 7

D. Another

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

47. Nhiều lựa chọn

What gets printed? Media VietJack

A. 14,18,

B. 16,20,

C. 16,21

48. Nhiều lựa chọn

What gets printed ? Media VietJack

A. -1

B. 0

C. 1

D. Complier error

49. Nhiều lựa chọn

What is output ? Media VietJack

A. Hello

B. Hi

C. Complier error

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

© All rights reserved VietJack