Quizne

700+ câu trắc nghiệm Ngôn ngữ lập trình C có đáp án - Phần 17

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

Đề gồm 25 câu trắc nghiệm một lựa chọn môn Ngôn ngữ lập trình C; cả 25 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

Class members are public by default.

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

Đáp án: B

Câu 2

Friend functions have access only to public members of the class.

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

Đáp án: B

Câu 3

A function designed as public can be accessible by non-members of a class.

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

Đáp án: A

Câu 4

Friendship is commutative.

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

Đáp án: B

Câu 5

New and delete are operators.

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

Đáp án: A

Câu 6

We can implement generic classes using templates

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

Đáp án: A

Câu 7

Using operator overloading we can invent new operators.

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

Đáp án: B

Câu 8

Inheritance helps in making a general class into a more specific class.

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

Đáp án: A

Câu 9

A base class is never used to create objects.

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

Đáp án: B

Câu 10

Classes can be inherited privately.

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

Đáp án: A

Câu 11

It Is legal to return local variables from a function which returns by reference.

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

Đáp án: B

Câu 12

Constructors can be virtual like virtual destructors

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

Đáp án: B

Câu 13

C++ is a pure object oriented programming language.

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

Đáp án: B

Câu 14

In C++ one can define a function within another function.

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

Đáp án: B

Câu 15

A class encapsulates the implementation and interface of a user-defined data type and constitutes an abstract data type.

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

Đáp án: A

Câu 16

In c++ an identifier can begin with a $ sign.

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

Đáp án: A

Câu 17

“My Variable” is a valid identifier in C++.

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

Đáp án: A

Câu 18

In C++ one can get the memory addresses of variables and functions.

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

Đáp án: A

Câu 19

%= is not a operator in C++

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

Đáp án: B

Câu 20

std::cout is a standard input stream.

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

Đáp án: B

Câu 21

Preprocessor #define macro and inline functions use the same mechanism.

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

Đáp án: B

Câu 22

All C++ functions are recursive.

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

Đáp án: A

Câu 23

The ‘break’ keyword is only used in the switch..case statement.

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

Đáp án: B

Câu 24

The new operator returns the address and size of the memory block that it allocates.

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

Đáp án: B

Câu 25

The heap storage is used for local objects.

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

Đáp án: B

Bảng đáp án (25 câu)
  1. 1. B
  2. 2. B
  3. 3. A
  4. 4. B
  5. 5. A
  6. 6. A
  7. 7. B
  8. 8. A
  9. 9. B
  10. 10. A
  11. 11. B
  12. 12. B
  13. 13. B
  14. 14. B
  15. 15. A
  16. 16. A
  17. 17. A
  18. 18. A
  19. 19. B
  20. 20. B
  21. 21. B
  22. 22. A
  23. 23. B
  24. 24. B
  25. 25. B