Tạo Trắc Nghiệm

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

Xem trước: đọc nhanh mọi câu dạng chữ, chưa tính giờ, chưa hiện đáp án.
Luyện tập: chọn đáp án là biết đúng sai ngay, kèm lời giải.
Thi thử: nộp bài mới chấm điểm và hiện lời giải.

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