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

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ợp140 lượt thi
50 câu hỏi
1.Trắc nghiệm
• 1 điểm
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

Chọn C

2.Trắc nghiệm
• 1 điểm
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

Chọn A

3.Trắc nghiệm
• 1 điểm
Which of the following correctly shows the hierarchy of arithmetic operator in C?

/ + * –

* – / +

+ – / *

/ * + –

Xem đáp án

Chọn D

4.Trắc nghiệm
• 1 điểm
Which of the following is the correct order of evaluation for the below expression? z = x + y * z / 4 % 2 – 1;

* / % + – =

= * / % + –

/ * % – + =

* % / – + =

Xem đáp án

Chọn A

5.Trắc nghiệm
• 1 điểm
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

Chọn C

6.Trắc nghiệm
• 1 điểm
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

Chọn C

7.Trắc nghiệm
• 1 điểm
What will be the output of the program?
Media VietJack

z = 0

z = 1

z = 4

z = 3

Xem đáp án

Chọn B

8.Trắc nghiệm
• 1 điểm
Every operators has an Associativity

Yes

No

Xem đáp án

Chọn B

9.Trắc nghiệm
• 1 điểm
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

Chọn A

2048.vn

Học thông minh hơn mỗi ngày

Xem toàn bộ 50 câu hỏi và nhiều hơn nữa với tài khoản miễn phí

Tạo đề thi
Tổ chức kiểm tra
Báo cáo chấm điểm tự động
Bạn đã có tài khoản?
10.Trắc nghiệm
• 1 điểm
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

Chọn A

11.Trắc nghiệm
• 1 điểm
Are the following two statement same?
Media VietJack

Yes

No

Xem đáp án

Chọn A

12.Trắc nghiệm
• 1 điểm
What will be the output of the program?
Media VietJack

6

3

12

Complier error

Xem đáp án

Chọn A

13.Trắc nghiệm
• 1 điểm
What will be output of the program?
Media VietJack

0 4 1

1 4 1

4 4 1

None of these

Xem đáp án

Chọn A

14.Trắc nghiệm
• 1 điểm
What will be output of the program?
Media VietJack

4 4

3 4

2 2

2 3

Xem đáp án

Chọn A

15.Trắc nghiệm
• 1 điểm
What will be output of the program?
Media VietJack

c = 1

c = 29

c = 10

c = 19

Xem đáp án

Chọn A

16.Trắc nghiệm
• 1 điểm
What will be output of the program?
Media VietJack

4 3 2

4 3 3

2 3 2

2 3 3

Xem đáp án

Chọn D

17.Trắc nghiệm
• 1 điểm
What will be output of the program?
Media VietJack

20

30

40

10

Xem đáp án

Chọn B

18.Trắc nghiệm
• 1 điểm
What is output of the program?
Media VietJack

4

3

Complier error

None of above

Xem đáp án

Chọn A

19.Trắc nghiệm
• 1 điểm
What will be output of the program?
Media VietJack

3, 0, 0,

3, 3, 3,

3, garbage, garbage

Another

Xem đáp án

Chọn A

20.Trắc nghiệm
• 1 điểm
What value is returned by function func()?
Media VietJack

5

0

Exception

Another

Xem đáp án

Chọn C

21.Trắc nghiệm
• 1 điểm
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

Chon A

22.Trắc nghiệm
• 1 điểm
What will be output when you will execute following c code?
Media VietJack

AAAAAABCDEF

AAAAAABCDE

ABCDEF

Another

Xem đáp án

Chọn A

23.Trắc nghiệm
• 1 điểm
What gets printed?
Media VietJack

3

4

5

6

Xem đáp án

Chọn D

24.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

Hello

Nothing

Complier Error

Run time error

Xem đáp án

Chọn B

25.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

012

Run time error

3

2

Xem đáp án

Chọn C

26.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

Complie time error

Infinite Loop

Nothing

Xem đáp án

Chọn A

27.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

In for loop

After loop

Complie error

Xem đáp án

Chọn B

28.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

True

False

Complie Error

Another

Xem đáp án

Chọn B

29.Trắc nghiệm
• 1 điểm
What is output ?
Media VietJack

5, 5

10, 10

Syntax error

Xem đáp án

Chọn B

30.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

a = 5,b = 5

a = 4,b = 4

a = 5,b = 0

Another

Xem đáp án

Chọn C

31.Trắc nghiệm
• 1 điểm
What is output ?
Media VietJack

Hello

Hello is printed 3 times

Hello is prined 4 times

Hello is printed 5 times

Xem đáp án

Chọn A

32.Trắc nghiệm
• 1 điểm
What is output ?
Media VietJack

Hello

Hello is printed 3 times

Hello is prined 4 times

Hello is printed 5 times

Xem đáp án

Chọn A

33.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

1 2 3

0 1 2 3

0 1 2

Xem đáp án

Chọn A

34.Trắc nghiệm
• 1 điểm
What is output ?
Media VietJack

12345

123456

6

1234

Xem đáp án

Chọn C

35.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

99 99 99

Complier Error

1

Xem đáp án

Chọn A

36.Trắc nghiệm
• 1 điểm
How many times will “vncoding” is printed on screen?
Media VietJack

10

11

Infinite

Xem đáp án

Chọn A

37.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

1 3

1 2

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

Xem đáp án

Chọn A

38.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

Start End Start End

Start Start Start

Start Start Start Start

Xem đáp án

Chọn B

39.Trắc nghiệm
• 1 điểm
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

Chọn D

40.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

Infinite loop

35

38

39

Xem đáp án

Chọn C

41.Trắc nghiệm
• 1 điểm
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

Chọn A

42.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

0

-1

-2

-3

Xem đáp án

Chọn B

43.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

0

2

3

-4

Xem đáp án

Chọn B

44.Trắc nghiệm
• 1 điểm
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

Chọn B

45.Trắc nghiệm
• 1 điểm
What gets printed?
Media VietJack

5

6

7

Another

Xem đáp án

Chọn B

46.Trắc nghiệm
• 1 điểm
What gets printed?
Media VietJack

Value of x is 0

Value of x is not 0

Error

Xem đáp án

Chọn B

47.Trắc nghiệm
• 1 điểm
What gets printed?
Media VietJack

14,18,

16,20,

16,21

Xem đáp án

Chọn C

48.Trắc nghiệm
• 1 điểm
What gets printed ?
Media VietJack

-1

0

1

Complier error

Xem đáp án

Chọn A

49.Trắc nghiệm
• 1 điểm
What is output ?
Media VietJack

Hello

Hi

Complier error

Xem đáp án

Chọn A

50.Trắc nghiệm
• 1 điểm
What is output?
Media VietJack

x=0 y=1

x=0 y=0

Error syntax

Xem đáp án

Chọn B

Bạn có thích hoạt động này không?

Hãy lưu hoặc chia sẻ nội dung này đến mọi người.

Khám phá các nguồn tài nguyên miễn phí, phù hợp với tiêu chuẩn trong vài giây

Gợi ý cho bạn

Xem tất cả

Học liệu phổ biến Trắc nghiệm tổng hợp

Xem tất cả

Học liệu phổ biến IT Test

Xem tất cả