Quizne

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

50 câu · Đề ôn tập tổng hợp

Đề gồm 50 câu trắc nghiệm một lựa chọn môn Lập trình C/C++; cả 50 câu đều có đáp án. Chọn Luyện tập để biết đúng sai từng câu, hoặc Thi thử có đồng hồ để lấy điểm thang 10.

Câu 1

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: B

Câu 2

What is output? Giả sử dùng VC++ 2008 trên hệ điều hành 32 bit
Media VietJack

Đáp án và lời giải

Đáp án: B

Câu 3

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: A

Câu 4

What is output?
Media VietJackMedia VietJack

Đáp án và lời giải

Đáp án: A

Câu 5

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: B

Câu 6

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: A

Câu 7

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: A

Câu 8

Which of the following operators can be applied on structure variables?

Đáp án và lời giải

Đáp án: D

Câu 9

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: B

Câu 10

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: C

Câu 11

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: B

Câu 12

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: C

Câu 13

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: C

Câu 14

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: B

Câu 15

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: A

Câu 16

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: C

Câu 17

What is output?
Media VietJack

Đáp án và lời giải

Đáp án: C

Câu 18

A ____ is a special member function used to initialize the data members of a class.

Đáp án và lời giải

Đáp án: A

Câu 19

The default access for members of a class is ___ .

Đáp án và lời giải

Đáp án: A

Câu 20

Member functions of a class are normally made ___ and data members of a class are normally made ___ .

Đáp án và lời giải

Đáp án: C

Câu 21

Inheritance enables ___ which saves time in development , and encourages using previously proven and high quality software.

Đáp án và lời giải

Đáp án: A

Câu 22

The three member access specifiers are ___, ___ and ___ .

Đáp án và lời giải

Đáp án: A

Câu 23

A “has a” relationship between classes represents ___ and an “is a” relationship between classes represent ___ .

Đáp án và lời giải

Đáp án: A

Câu 24

A pure virtual function is specified by placing ___ at the end of its prototype in the class definition.

Đáp án và lời giải

Đáp án: A

Câu 25

A operator ___ is called as de-referencing operator.

Đáp án và lời giải

Đáp án: B

Câu 26

The size of a class with no data members and member functions is ___ bytes

Đáp án và lời giải

Đáp án: B

Câu 27

A class is called as abstract base class if it has a ___ function

Đáp án và lời giải

Đáp án: A

Câu 28

Run-time or dynamic allocation of memory may be done using the C++ operator ___ .

Đáp án và lời giải

Đáp án: A

Câu 29

Operator overloading permits to extend the applicability of existing C++ operators so that they work with new ___ or ___.

Đáp án và lời giải

Đáp án: A

Câu 30

A ___ is a set of instance or values.

Đáp án và lời giải

Đáp án: B

Câu 31

C++ programming language was designed and developed by ___ at ___.

Đáp án và lời giải

Đáp án: B

Câu 32

C++ is a ___ programming language with ___ extensions.

Đáp án và lời giải

Đáp án: A

Câu 33

Pointers are ___ that contain the addresses of other variables and ____ .

Đáp án và lời giải

Đáp án: C

Câu 34

A program can use the address of any variable in an expression, except variables declared with the ___ storage class.

Đáp án và lời giải

Đáp án: B

Câu 35

New operator allocates memory blocks from the ___.

Đáp án và lời giải

Đáp án: B

Câu 36

The new operator throws a ___ when heap is exhausted.

Đáp án và lời giải

Đáp án: A

Câu 37

The (assert.h) header is used for ___ .

Đáp án và lời giải

Đáp án: A

Câu 38

The constructor and destructor of a class in C++ are called ___

Đáp án và lời giải

Đáp án: A

Câu 39

Two or more functions may have the same name, as long as their ___ are different.

Đáp án và lời giải

Đáp án: B

Câu 40

A constructor with default arguments for all its parameters is called a ___ constructor.

Đáp án và lời giải

Đáp án: C

Câu 41

Run time polymorphism is ___ than the compile time polymorphism.

Đáp án và lời giải

Đáp án: B

Câu 42

The two types of polymorphism is : ____ & ____ .

Đáp án và lời giải

Đáp án: A

Câu 43

A file stream is an extension of a ___ stream.

Đáp án và lời giải

Đáp án: A

Câu 44

The Standard Template Library(STL) is a library of ___ templates.

Đáp án và lời giải

Đáp án: A

Câu 45

Run time polymorphism is ___ than the compile time polymorphism.

Đáp án và lời giải

Đáp án: B

Câu 46

With private inheritance, public and protected members of the base class become ___ members of the derived class.

Đáp án và lời giải

Đáp án: A

Câu 47

The STL Container adapters contains the ___ , ___ and ___ STL containers.

Đáp án và lời giải

Đáp án: C

Câu 48

The ___ block contains code that directly or indirectly might cause an exception to be thrown.

Đáp án và lời giải

Đáp án: B

Câu 49

When writing function or class template, one use a ___ to specify a generic data type.

Đáp án và lời giải

Đáp án: A

Câu 50

Data items in a class may be public.

Đáp án và lời giải

Đáp án: A

Bảng đáp án (50 câu)
  1. 1. B
  2. 2. B
  3. 3. A
  4. 4. A
  5. 5. B
  6. 6. A
  7. 7. A
  8. 8. D
  9. 9. B
  10. 10. C
  11. 11. B
  12. 12. C
  13. 13. C
  14. 14. B
  15. 15. A
  16. 16. C
  17. 17. C
  18. 18. A
  19. 19. A
  20. 20. C
  21. 21. A
  22. 22. A
  23. 23. A
  24. 24. A
  25. 25. B
  26. 26. B
  27. 27. A
  28. 28. A
  29. 29. A
  30. 30. B
  31. 31. B
  32. 32. A
  33. 33. C
  34. 34. B
  35. 35. B
  36. 36. A
  37. 37. A
  38. 38. A
  39. 39. B
  40. 40. C
  41. 41. B
  42. 42. A
  43. 43. A
  44. 44. A
  45. 45. B
  46. 46. A
  47. 47. C
  48. 48. B
  49. 49. A
  50. 50. A