vietjack.com

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

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

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. LAPTRINHC++.NET

B. .NETLAPTRINHC++

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

Xem giải thích câu trả lời
2. Nhiều lựa chọn

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

A. 9

B. 12

C. 16

D. 24

Xem giải thích câu trả lời
3. Nhiều lựa chọn

What is output? Media VietJack

A. 20

B. 18

C. 32

D. 24

Xem giải thích câu trả lời
4. Nhiều lựa chọn

What is output? Media VietJackMedia VietJack

A. ID=1009, dd/mm/yyyy = 16/09/1989

B. ID = 1009, dd/mm/yyyy = garbage value/garbage value/garbage value (garbage value: giá trị rác)

C. Error sytax (Lỗi cú pháp)

Xem giải thích câu trả lời
5. Nhiều lựa chọn

What is output? Media VietJack

A. laptrinhc++ 2

B. Complier error

C. Runtime error

Xem giải thích câu trả lời
6. Nhiều lựa chọn

What is output? Media VietJack

A. 4

B. Complier error

C. 8

Xem giải thích câu trả lời
7. Nhiều lựa chọn

What is output? Media VietJack

A. 16

B. 22

C. 32

D. 18

Xem giải thích câu trả lời
8. Nhiều lựa chọn

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

A. Equality comparison ( == )

B. Assignment ( = )

C. Both of the above

D. None of the above

Xem giải thích câu trả lời
9. Nhiều lựa chọn

What is output? Media VietJack

A. 21

B. 27

C. Complier Error

D. Another

Xem giải thích câu trả lời
10. Nhiều lựa chọn

What is output? Media VietJack

A. 530

B. 70

C. 40

D. Complier Error

Xem giải thích câu trả lời
11. Nhiều lựa chọn

What is output? Media VietJack

A. Y = 3

B. Y = 5

C. Garbage value

Xem giải thích câu trả lời
12. Nhiều lựa chọn

What is output? Media VietJack

A. C/C++

B. Java

C. Complier error

Xem giải thích câu trả lời
13. Nhiều lựa chọn

What is output? Media VietJack

A. C/C++

B. Java

C. Complier error

Xem giải thích câu trả lời
14. Nhiều lựa chọn

What is output? Media VietJack

A. 1

B. 36

C. 6

D. 30

Xem giải thích câu trả lời
15. Nhiều lựa chọn

What is output? Media VietJack

A. 10 50

B. 10 10

C. 50 50

Xem giải thích câu trả lời
16. Nhiều lựa chọn

What is output? Media VietJack

A. 1000

B. 100

C. Complier error

Xem giải thích câu trả lời
17. Nhiều lựa chọn

What is output? Media VietJack

A. ‘laptrinhc++’ is printed 3 times

B. ‘laptrinhc++’ is printed 2 times

C. Complier error

Xem giải thích câu trả lời
18. Nhiều lựa chọn

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

A. constructor

B. destructor

C. static method

Xem giải thích câu trả lời
19. Nhiều lựa chọn

The default access for members of a class is ___ .

A. private

B. public

C. protected

D. protect

Xem giải thích câu trả lời
20. Nhiều lựa chọn

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

A. private, public

B. protected, public

C. public, private

D. public, protected

Xem giải thích câu trả lời
21. Nhiều lựa chọn

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

A. reusability

B. encapsulation

C. development

Xem giải thích câu trả lời
22. Nhiều lựa chọn

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

A. public, private, protected

B. public, private, protect

C. public, private, static

Xem giải thích câu trả lời
23. Nhiều lựa chọn

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

A. containment, inheritance

B. hiding, inheritance

C. encapsulation, inheritance

Xem giải thích câu trả lời
24. Nhiều lựa chọn

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

A. =0

B. =1

C. =-1

Xem giải thích câu trả lời
25. Nhiều lựa chọn

A operator ___ is called as de-referencing operator.

A. &

B. *

C. &&

Xem giải thích câu trả lời
26. Nhiều lựa chọn

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

A. 0

B. 1

C. 4

Xem giải thích câu trả lời
27. Nhiều lựa chọn

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

A. pure virtual

B. static

C. private

Xem giải thích câu trả lời
28. Nhiều lựa chọn

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

A. new

B. alloc

C. malloc

Xem giải thích câu trả lời
29. Nhiều lựa chọn

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

A. data types, objects

B. data types, constant

C. data types, pointer

Xem giải thích câu trả lời
30. Nhiều lựa chọn

A ___ is a set of instance or values.

A. class

B. object

C. function

Xem giải thích câu trả lời
31. Nhiều lựa chọn

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

A. Steven Job, AT&T Bell Labs

B. Bjarne Stroustrup, AT&T Bell Labs

C. Guido van Rossum, M&D Lab

Xem giải thích câu trả lời
32. Nhiều lựa chọn

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

A. procedural, object oriented

B. object, procedural

C. procedural, STL

Xem giải thích câu trả lời
33. Nhiều lựa chọn

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

A. value, object

B. object, class

C. variables, functions

Xem giải thích câu trả lời
34. Nhiều lựa chọn

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

A. static

B. register

C. auto

Xem giải thích câu trả lời
35. Nhiều lựa chọn

New operator allocates memory blocks from the ___.

A. Stack

B. Heap

C. Register

Xem giải thích câu trả lời
36. Nhiều lựa chọn

The new operator throws a ___ when heap is exhausted.

A. runtime exception

B. syntax error

C. logic error

Xem giải thích câu trả lời
37. Nhiều lựa chọn

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

A. debugging

B. checking memory leak

C. library for time

Xem giải thích câu trả lời
38. Nhiều lựa chọn

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

A. automatically

B. manually

C. none of above

Xem giải thích câu trả lời
39. Nhiều lựa chọn

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

A. return type

B. parameter lists

C. none of above

Xem giải thích câu trả lời
40. Nhiều lựa chọn

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

A. static

B. run-time

C. default

Xem giải thích câu trả lời
41. Nhiều lựa chọn

Run time polymorphism is ___ than the compile time polymorphism.

A. dynamic

B. static

C. public

Xem giải thích câu trả lời
42. Nhiều lựa chọn

The two types of polymorphism is : ____ & ____ .

A. Run time and compile time

B. Preprocessor, compile time

C. Preprocessor, Linker

Xem giải thích câu trả lời
43. Nhiều lựa chọn

A file stream is an extension of a ___ stream.

A. console

B. windows

C. none of above

Xem giải thích câu trả lời
44. Nhiều lựa chọn

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

A. container class

B. time class

C. none of above

Xem giải thích câu trả lời
45. Nhiều lựa chọn

Run time polymorphism is ___ than the compile time polymorphism.

A. less flexible

B. more flexible

C. none of above

Xem giải thích câu trả lời
46. Nhiều lựa chọn

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

A. private

B. public

C. protected

Xem giải thích câu trả lời
47. Nhiều lựa chọn

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

A. Stack, Queue, Priority_queue

B. Set, Multiset, Map

C. vectors, lists, deques

Xem giải thích câu trả lời
48. Nhiều lựa chọn

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

A. catch

B. try

C. none of above

Xem giải thích câu trả lời
49. Nhiều lựa chọn

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

A. template parameters

B. keyword

C. none of above

Xem giải thích câu trả lời
50. Nhiều lựa chọn

Data items in a class may be public.

A. TRUE

B. FALSE

Xem giải thích câu trả lời
© All rights reserved VietJack