
700+ câu trắc nghiệm Ngôn ngữ lập trình C có đáp án - Phần 19
25 câu hỏi
21,21
20,21
21,22
compile error
Chọn đáp án D
100
101
none
compile error
Chọn đáp án A
Encapsulation
Information Hiding
Data abstraction
All of the above
Chọn đáp án D
all of above
(i)
(i), (iii)
Chọn đáp án A
friend
inline
static
virtual
Chọn đáp án A
Information hiding
Inheritance
Redefinition
Overloading
Chọn đáp án B
The appropriate redefined version of the function will be used
The base-class version of the function will always be used
The outcome is unpredictable
A run-time error will occur
Chọn đáp án B
A const member
A reference parameter
A static member
A function member
Chọn đáp án C
An abstract class that is at the top of the inheritance hierarchy.
A class with a pure virtual function in it.
A class that inherits from another class
A class that is inherited by another class, and thus is included in that class.
Chọn đáp án D
Is visible only in the subclasses (and not in the class it is declared in)
Is visible only in the class it is declared in
Is visible to all classes, but modifiable only in the class where it is declared
Is visible in the class it is declared in, and all of its sub-classes
Chọn đáp án D
A function called when an instance of a class is initialized
A function that is called when an instance of a class is deleted
A special function to change the value of dynamically allocated memory
A function that is called in order to change the value of a variable
Chọn đáp án B
The public members of the base class become public
The public members of the base class become protected
The protected members of the base class become private
The public members of the base class become inaccessible
Chọn đáp án B
Each instance of a class will have its own copy of the variable
Changing the variable in one instance will have no effect on other instances of the class
Changing the variable in one instance will have no effect on other instances of the class
Every instance of the class must consider the value of the static variable before initializing
Chọn đáp án C
Used to instantiate an object from another existing object
To copy one object to another existing object
Can be a substitute for a ‘=’ operator
All of the above
Chọn đáp án D
Have wine and cheese with that other friend
Allow that class to declare an instance of it in its list of private variables
Allow the other class (the one declared as friend) to access to the declaring class’s private variables
Allow the class declaring the other as a friend to access the declared class’s private variables
Chọn đáp án C
constructors
destructors
static functions
None of the above
Chọn đáp án B
In the catch block
In the throw clause
In the constructor of a class
Only when memory allocation fails
Chọn đáp án B
can be used without an instantiation of an object
can only access static data
Both 1 and 2 are correct
Neither 1 nor 2 are correct
Chọn đáp án C
The class must not have method
The class must have a constructor that takes no arguments
The class must have a function definition equal to zero
The class may only exist during the planning phase
Chọn đáp án C
1
2
3
error
Chọn đáp án B
i1=2 i2=2
i1=2 i2=3
i1=3 i2=2
Error
Chọn đáp án B
only a and b
a,b and c
only a
error
Chọn đáp án D
0
5
6
7
Chọn đáp án C
There is nothing wrong
One cannot have a ‘Base’ pointer to ‘Derived’ since it is not derived publicly
One need a derived class pointer to point to a derived class
One required to code a constructor for Derived
Chọn đáp án B
professor researcher teacher myprofessor
researcher professor teacher myprofessor
myprofessor teacher researcher professor
myprofessor researcher professor teacher
Chọn đáp án B
Bạn có thích hoạt động này không?
Hãy lưu hoặc chia sẻ nội dung này đến mọi người.


















