2048.vn

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
IT TestTrắc nghiệm tổng hợp11 lượt thi
50 câu hỏi
1. Trắc nghiệm
1 điểmKhông giới hạn

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

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

a>b? c = 20;

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

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

Xem đáp án
2. Trắc nghiệm
1 điểmKhông giới hạn

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

True

False

Xem đáp án
3. Trắc nghiệm
1 điểmKhông giới hạn

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

/ + * –

* – / +

+ – / *

/ * + –

Xem đáp án
4. Trắc nghiệm
1 điểmKhông giới hạn

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

* / % + – =

= * / % + –

/ * % – + =

* % / – + =

Xem đáp án
5. Trắc nghiệm
1 điểmKhông giới hạn

What will be the output of the program?Media VietJack

1 1 1 1

1 0 0 1

1 0 1 1

Other

Xem đáp án
6. Trắc nghiệm
1 điểmKhông giới hạn

What will be the output of the program?Media VietJack

1 0 1

1 1 1

0 0 0

0 1 0

Xem đáp án
7. Trắc nghiệm
1 điểmKhông giới hạn

What will be the output of the program?Media VietJack

z = 0

z = 1

z = 4

z = 3

Xem đáp án
8. Trắc nghiệm
1 điểmKhông giới hạn

Every operators has an Associativity

Yes

No

Xem đáp án
9. Trắc nghiệm
1 điểmKhông giới hạn

What will be the output of the program?Media VietJack

4 2 -1 1

4 3 0 1

3 2 -1 1

Xem đáp án
10. Trắc nghiệm
1 điểmKhông giới hạn

What is output of the program?Media VietJack

4 3 0 0

3 3 0 1

4 2 0 0

None of these

Xem đáp án
11. Trắc nghiệm
1 điểmKhông giới hạn

Are the following two statement same?Media VietJack

Yes

No

Xem đáp án
12. Trắc nghiệm
1 điểmKhông giới hạn

What will be the output of the program?Media VietJack

6

3

12

Complier error

Xem đáp án
13. Trắc nghiệm
1 điểmKhông giới hạn

What will be output of the program?Media VietJack

0 4 1

1 4 1

4 4 1

None of these

Xem đáp án
14. Trắc nghiệm
1 điểmKhông giới hạn

What will be output of the program?Media VietJack

4 4

3 4

2 2

2 3

Xem đáp án
15. Trắc nghiệm
1 điểmKhông giới hạn

What will be output of the program?Media VietJack

c = 1

c = 29

c = 10

c = 19

Xem đáp án
16. Trắc nghiệm
1 điểmKhông giới hạn

What will be output of the program?Media VietJack

4 3 2

4 3 3

2 3 2

2 3 3

Xem đáp án
17. Trắc nghiệm
1 điểmKhông giới hạn

What will be output of the program?Media VietJack

20

30

40

10

Xem đáp án
18. Trắc nghiệm
1 điểmKhông giới hạn

What is output of the program?Media VietJack

4

3

Complier error

None of above

Xem đáp án
19. Trắc nghiệm
1 điểmKhông giới hạn

What will be output of the program?Media VietJack

3, 0, 0,

3, 3, 3,

3, garbage, garbage

Another

Xem đáp án
20. Trắc nghiệm
1 điểmKhông giới hạn

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

5

0

Exception

Another

Xem đáp án
21. Trắc nghiệm
1 điểmKhông giới hạn

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

mmmm aaaa nnnn

mmm aaa nnn

mmmm aaa nnn

Another

Xem đáp án
22. Trắc nghiệm
1 điểmKhông giới hạn

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

AAAAAABCDEF

AAAAAABCDE

ABCDEF

Another

Xem đáp án
23. Trắc nghiệm
1 điểmKhông giới hạn

What gets printed?Media VietJack

3

4

5

6

Xem đáp án
24. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

Hello

Nothing

Complier Error

Run time error

Xem đáp án
25. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

012

Run time error

3

2

Xem đáp án
26. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

Complie time error

Infinite Loop

Nothing

Xem đáp án
27. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

In for loop

After loop

Complie error

Xem đáp án
28. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

True

False

Complie Error

Another

Xem đáp án
29. Trắc nghiệm
1 điểmKhông giới hạn

What is output ?Media VietJack

5, 5

10, 10

Syntax error

Xem đáp án
30. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

a = 5,b = 5

a = 4,b = 4

a = 5,b = 0

Another

Xem đáp án
31. Trắc nghiệm
1 điểmKhông giới hạn

What is output ?Media VietJack

Hello

Hello is printed 3 times

Hello is prined 4 times

Hello is printed 5 times

Xem đáp án
32. Trắc nghiệm
1 điểmKhông giới hạn

What is output ?Media VietJack

Hello

Hello is printed 3 times

Hello is prined 4 times

Hello is printed 5 times

Xem đáp án
33. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

1 2 3

0 1 2 3

0 1 2

Xem đáp án
34. Trắc nghiệm
1 điểmKhông giới hạn

What is output ?Media VietJack

12345

123456

6

1234

Xem đáp án
35. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

99 99 99

Complier Error

1

Xem đáp án
36. Trắc nghiệm
1 điểmKhông giới hạn

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

10

11

Infinite

Xem đáp án
37. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

1 3

1 2

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

Xem đáp án
38. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

Start End Start End

Start Start Start

Start Start Start Start

Xem đáp án
39. Trắc nghiệm
1 điểmKhông giới hạn

What is output of the following code?Media VietJack

1 2 3 4 5 6 7 8 9

3 4 5 6 7 8 9

4 5 6 7 8 9

4 5 6 7 8 9 10

Xem đáp án
40. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

Infinite loop

35

38

39

Xem đáp án
41. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

6, 5, 4, 3, 2, 1,

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

Complier Error

Infinite loop

Xem đáp án
42. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

0

-1

-2

-3

Xem đáp án
43. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

0

2

3

-4

Xem đáp án
44. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

print i and j from 0 till 4

print i and j from 0 till 5

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

Complier Error

Xem đáp án
45. Trắc nghiệm
1 điểmKhông giới hạn

What gets printed?Media VietJack

5

6

7

Another

Xem đáp án
46. Trắc nghiệm
1 điểmKhông giới hạn

What gets printed?Media VietJack

Value of x is 0

Value of x is not 0

Error

Xem đáp án
47. Trắc nghiệm
1 điểmKhông giới hạn

What gets printed?Media VietJack

14,18,

16,20,

16,21

Xem đáp án
48. Trắc nghiệm
1 điểmKhông giới hạn

What gets printed ?Media VietJack

-1

0

1

Complier error

Xem đáp án
49. Trắc nghiệm
1 điểmKhông giới hạn

What is output ?Media VietJack

Hello

Hi

Complier error

Xem đáp án
50. Trắc nghiệm
1 điểmKhông giới hạn

What is output?Media VietJack

x=0 y=1

x=0 y=0

Error syntax

Xem đáp án
© All rights reserved VietJack