vietjack.com

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

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

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

What is output? Media VietJack

A. Hey

B. 5

C. 5Hey

D. Complie error

2. Nhiều lựa chọn

What is output? Media VietJack

A. 1 4

B. 1 2 3 4

C. Syntax error

D. Syntax error

3. Nhiều lựa chọn

What is output? \Media VietJack

A. Complie error

B. 3

C. 1

D. 1 3

4. Nhiều lựa chọn

What is output? Media VietJack

A. loop loop loop

B. Infinite loop

C. Complie error

5. Nhiều lựa chọn

What is output? Media VietJack

A. True

B. False

C. Complier Error

D. Run time error

6. Nhiều lựa chọn

What is output? Media VietJack

A. A

B. B

C. ABC

7. Nhiều lựa chọn

What is output? Media VietJack

A. A

B. B

C. ABC

8. Nhiều lựa chọn

What is output? Media VietJack

A. FALSE

B. TRUE

C. Default

9. Nhiều lựa chọn

What is output? Media VietJack

A. 3

B. 5

C. 03

D. 05

10. Nhiều lựa chọn

What is output? Media VietJack

A. 3

B. 4

C. 5

D. 6

11. Nhiều lựa chọn

What is output? Media VietJack

A. x = 2

B. x = 6

C. x = 0

12. Nhiều lựa chọn

What is output? Media VietJack

A. ABC

B. BC

C. B

D. Complier Error

13. Nhiều lựa chọn

What is output of code? Media VietJack

A. ABC

B. DEF

C. Syntax error

14. Nhiều lựa chọn

What is output of code? Media VietJack

A. Equal

B. Unequal

C. nothing is printed

15. Nhiều lựa chọn

What is output of code? Media VietJack

A. True

B. False

C. Complier error

16. Nhiều lựa chọn

What is output of code? Media VietJack

A. True

B. False

C. Complier error

17. Nhiều lựa chọn

What is output of code? Media VietJack

A. True

B. False

C. Complier error

18. Nhiều lựa chọn

What is output of code? Media VietJack

A. 2468101214161820

B. 468101214161820

C. nothing is printed

19. Nhiều lựa chọn

What is output of code? Media VietJack

A. C/C++ 15

B. Java 15

C. Java 5

D. Complier error

20. Nhiều lựa chọn

What is output of code? Media VietJack

A. C/C++ 80

B. C/C++ 81

C. Java 80

D. Java 81

21. Nhiều lựa chọn

What is output of code? Media VietJack

A. 1 12

B. 2 12

C. 2 11

22. Nhiều lựa chọn

What is output ? Media VietJack

A. hello_World

B. ello_World

C. llo_World

D. lo_World

23. Nhiều lựa chọn

What is output? Media VietJack

A. hello_World

B. ello_World

C. llo_World

D. lo_World

24. Nhiều lựa chọn

What is output? Media VietJack

A. 3

B. 4

C. 5

D. 6

25. Nhiều lựa chọn

What is output? Media VietJack

A. 10#15

B. 10#10

C. 15#15

D. 11#15

26. Nhiều lựa chọn

What is output of following code? Media VietJack

A. 4#4

B. 4#5

C. 5#6

D. 4#6

27. Nhiều lựa chọn

What is output of following code? Media VietJack

A. 400 2

B. 400 400

C. 400 401

D. Complier error

28. Nhiều lựa chọn

What is output? Media VietJack

A. pvpit

B. vpit

C. v

D. Another

29. Nhiều lựa chọn

What is output? Media VietJack

A. 5

B. 7

C. 9

D. 10

30. Nhiều lựa chọn

For the code below which lines should be reported as errors by a compiler? Media VietJack

A. 1

B. 2

C. 3

D. None of the lines

31. Nhiều lựa chọn

What is output? Media VietJack

A. Complier error

B. 6

C. 5

D. Another

32. Nhiều lựa chọn

What is output? Media VietJack

A. 5

B. 6

C. 8

D. Complier Error

33. Nhiều lựa chọn

What is output of code? Media VietJack

A. 4

B. 5

C. 6

D. Complier Error

34. Nhiều lựa chọn

What is output of code? Media VietJack

A. 320

B. 64

C. Complier Error

35. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. Address of j , Address of i , 3

B. Complier Error

C. 3 , 3 , 3

36. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. printf("\n%d", ptr2);

B. strcpy(ptr1, "c");

C. strcpy(ptr2, "questions");

D. printf("\n%s %s", ptr1, ptr2);

37. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. int a = 10;

B. void *p = &a;

C. int *ptr = p;

D. printf("%u\n", *ptr);

38. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. 3

B. 4

C. 5

D. 6

39. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. 5 5

B. Complier Error

C. 5 Garbage value

40. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. Address of i Address of i

B. Garbage value Garbage value

C. Complier Error

41. Nhiều lựa chọn

What is output? Media VietJack

A. 6

B. 7

C. 8

D. 9

42. Nhiều lựa chọn

What is output? Media VietJack

A. I

B. E

C. M

D. N

43. Nhiều lựa chọn

What will be output of following program? Media VietJack

A. 37363534

B. 34353637

C. 45673333

44. Nhiều lựa chọn

What is output? Media VietJack

A. 11

B. 12

C. Garbage value

D. Complier error

45. Nhiều lựa chọn

Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements
2. The expression num[1] designates the very first element in the array
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.

A. 1,4

B. 3

C. 1,2

D. 1

46. Nhiều lựa chọn

The library function used to find the last occurrence of a character in a string is

A. strnstr()

B. strrchr()

C. laststr()

D. strstr()

47. Nhiều lựa chọn

What is output? (assuming that the array begins at the location 1002 and size of an integer is 4 bytes) Media VietJack

A. 1006, 2, 2

B. 1006, 4, 4

C. 1002, 5, 5

D. Error

48. Nhiều lựa chọn

What does the following declaration mean? Media VietJack

A. ptr is array of pointers to 10 integers

B. ptr is a pointer to an array of 10 integers

C. ptr is an array of 10 integers

D. ptr is an pointer to array

49. Nhiều lựa chọn

What is output? Media VietJack

A. LAPTRINHC++

B. LAPTRINHC++\0\.NET\0

C. LAPTRINHC++\0\.NET

50. Nhiều lựa chọn

What is output? Media VietJack

A. LAPTRINHC++.NET

B. .NETLAPTRINHC++

C. Address of pstr[0] Address of pstr[1]

© All rights reserved VietJack