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)

V
VietJack
IT TestTrắc nghiệm tổng hợp5 lượt thi
50 câu hỏi
1. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

LAPTRINHC++.NET

NETLAPTRINHC++

Address of pstr[0] Address of pstr[1]

Xem đáp án
2. Trắc nghiệm
1 điểmKhông giới hạn

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

9

12

16

24

Xem đáp án
3. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

20

18

32

24

Xem đáp án
4. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJackMedia VietJack

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

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

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

Xem đáp án
5. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

laptrinhc++ 2

Complier error

Runtime error

Xem đáp án
6. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

4

Complier error

8

Xem đáp án
7. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

16

22

32

18

Xem đáp án
8. Trắc nghiệm
1 điểmKhông giới hạn

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

Equality comparison ( == )

Assignment ( = )

Both of the above

None of the above

Xem đáp án
9. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

21

27

Complier Error

Another

Xem đáp án
10. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

530

70

40

Complier Error

Xem đáp án
11. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

Y = 3

Y = 5

Garbage value

Xem đáp án
12. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

C/C++

Java

Complier error

Xem đáp án
13. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

C/C++

Java

Complier error

Xem đáp án
14. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

1

36

6

30

Xem đáp án
15. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

10 50

10 10

50 50

Xem đáp án
16. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

1000

100

Complier error

Xem đáp án
17. Trắc nghiệm
1 điểmKhông giới hạn

What is output? Media VietJack

‘laptrinhc++’ is printed 3 times

‘laptrinhc++’ is printed 2 times

Complier error

Xem đáp án
18. Trắc nghiệm
1 điểmKhông giới hạn

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

constructor

destructor

static method

Xem đáp án
19. Trắc nghiệm
1 điểmKhông giới hạn

The default access for members of a class is ___ .

private

public

protected

protect

Xem đáp án
20. Trắc nghiệm
1 điểmKhông giới hạn

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

private, public

protected, public

public, private

public, protected

Xem đáp án
21. Trắc nghiệm
1 điểmKhông giới hạn

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

reusability

encapsulation

development

Xem đáp án
22. Trắc nghiệm
1 điểmKhông giới hạn

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

public, private, protected

public, private, protect

public, private, static

Xem đáp án
23. Trắc nghiệm
1 điểmKhông giới hạn

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

containment, inheritance

hiding, inheritance

encapsulation, inheritance

Xem đáp án
24. Trắc nghiệm
1 điểmKhông giới hạn

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

=0

=1

=-1

Xem đáp án
25. Trắc nghiệm
1 điểmKhông giới hạn

A operator ___ is called as de-referencing operator.

&

*

&&

Xem đáp án
26. Trắc nghiệm
1 điểmKhông giới hạn

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

0

1

4

Xem đáp án
27. Trắc nghiệm
1 điểmKhông giới hạn

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

pure virtual

static

private

Xem đáp án
28. Trắc nghiệm
1 điểmKhông giới hạn

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

new

alloc

malloc

Xem đáp án
29. Trắc nghiệm
1 điểmKhông giới hạn

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

data types, objects

data types, constant

data types, pointer

Xem đáp án
30. Trắc nghiệm
1 điểmKhông giới hạn

A ___ is a set of instance or values.

class

object

function

Xem đáp án
31. Trắc nghiệm
1 điểmKhông giới hạn

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

Steven Job, AT&T Bell Labs

Bjarne Stroustrup, AT&T Bell Labs

Guido van Rossum, M&D Lab

Xem đáp án
32. Trắc nghiệm
1 điểmKhông giới hạn

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

procedural, object oriented

object, procedural

procedural, STL

Xem đáp án
33. Trắc nghiệm
1 điểmKhông giới hạn

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

value, object

object, class

variables, functions

Xem đáp án
34. Trắc nghiệm
1 điểmKhông giới hạn

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

static

register

auto

Xem đáp án
35. Trắc nghiệm
1 điểmKhông giới hạn

New operator allocates memory blocks from the ___.

Stack

Heap

Register

Xem đáp án
36. Trắc nghiệm
1 điểmKhông giới hạn

The new operator throws a ___ when heap is exhausted.

runtime exception

syntax error

logic error

Xem đáp án
37. Trắc nghiệm
1 điểmKhông giới hạn

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

debugging

checking memory leak

library for time

Xem đáp án
38. Trắc nghiệm
1 điểmKhông giới hạn

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

automatically

manually

none of above

Xem đáp án
39. Trắc nghiệm
1 điểmKhông giới hạn

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

return type

parameter lists

none of above

Xem đáp án
40. Trắc nghiệm
1 điểmKhông giới hạn

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

static

run-time

default

Xem đáp án
41. Trắc nghiệm
1 điểmKhông giới hạn

Run time polymorphism is ___ than the compile time polymorphism.

dynamic

static

public

Xem đáp án
42. Trắc nghiệm
1 điểmKhông giới hạn

The two types of polymorphism is : ____ & ____ .

Run time and compile time

Preprocessor, compile time

Preprocessor, Linker

Xem đáp án
43. Trắc nghiệm
1 điểmKhông giới hạn

A file stream is an extension of a ___ stream.

console

windows

none of above

Xem đáp án
44. Trắc nghiệm
1 điểmKhông giới hạn

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

container class

time class

none of above

Xem đáp án
45. Trắc nghiệm
1 điểmKhông giới hạn

Run time polymorphism is ___ than the compile time polymorphism.

less flexible

more flexible

none of above

Xem đáp án
46. Trắc nghiệm
1 điểmKhông giới hạn

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

private

public

protected

Xem đáp án
47. Trắc nghiệm
1 điểmKhông giới hạn

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

Stack, Queue, Priority_queue

Set, Multiset, Map

vectors, lists, deques

Xem đáp án
48. Trắc nghiệm
1 điểmKhông giới hạn

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

catch

try

none of above

Xem đáp án
49. Trắc nghiệm
1 điểmKhông giới hạn

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

template parameters

keyword

none of above

Xem đáp án
50. Trắc nghiệm
1 điểmKhông giới hạn

Data items in a class may be public.

TRUE

FALSE

Xem đáp án
© All rights reserved VietJack