Tạo Trắc Nghiệm

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

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

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