Programming Hub C,C++,C#,Asp.Net,Ado.Net,Java,  HTML,SQL.

This Blog Post Only Education Purpose For All Education Related Blogs and Articles Post Here.Download Free Software and Study Materials Mores..

Saturday, 27 May 2017

Object Oriented Programming Concept C++ MCQ AMITY UNIVERSITY

                                     Questions 1 to 30.

1. 
Which of the following type of class allows only one object of it to be created?
Virtual class
Abstract class
Singleton class
Friend class
Answer: Option C
Which of the following is not a type of constructor?
Copy constructor
Friend constructor
Default constructor
Parameterized constructor
Answer: Option B
Which of the following statements is correct?
Base class pointer cannot point to derived class.
Derived class pointer cannot point to base class.
Pointer to derived class cannot be created.
Pointer to base class cannot be created.
Answer: Option B
Which of the following is not the member of class?
Static function
Friend function
Const function
Virtual function
Answer: Option B
Which of the following concepts means determining at runtime what method to invoke?
Data hiding
Dynamic Typing
Dynamic binding
Dynamic loading
Answer: Option C

6. 
Which of the following term is used for a function defined inside a class?
Member Variable
Member function
Class function
Classic function
Answer: Option B

7. 
Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?
Call by value
Call by reference
Default arguments
Call by pointer
Answer: Option C

8. 
How many instances of an abstract class can be created?
1
5
13
0
Answer: Option D

9. 
Which of the following cannot be friend?
Function
Class
Object
Operator function
Answer: Option C

10. 
Which of the following concepts of OOPS means exposing only necessary information to client?
Encapsulation
Abstraction
Data hiding
Data binding
Answer: Option C

11. 
Why reference is not same as a pointer?
A reference can never be null.
A reference once established cannot be changed.
Reference doesn't need an explicit dereferencing mechanism.
All of the above.
Answer: Option D

2. 
cout is a/an __________ .
operator
function
object
macro
Answer: Option C

13. 
Which of the following concepts provides facility of using object of one class inside another class?
Encapsulation
Abstraction
Composition
Inheritance
Answer: Option C

14. 
How many types of polymorphisms are supported by C++?
1
2
3
4
Answer: Option B

15. 
Which of the following is an abstract data type?
int
double
string
Class
Answer: Option D

16. 
Which of the following concepts means adding new components to a program as it runs?
Data hiding
Dynamic typing
Dynamic binding
Dynamic loading
Answer: Option D

17. 
Which of the following statement is correct?
A constructor is called at the time of declaration of an object.
A constructor is called at the time of use of an object.
A constructor is called at the time of declaration of a class.
A constructor is called at the time of use of a class.
Answer: Option A

18. 
Which of the following correctly describes overloading of functions?
Virtual polymorphism
Transient polymorphism
Ad-hoc polymorphism
Pseudo polymorphism
Answer: Option C

19. 
Which of the following approach is adapted by C++?
Top-down
Bottom-up
Right-left
Left-right
Answer: Option B

20. 
Which of the following is correct about function overloading?
The types of arguments are different.
The order of argument is different.
The number of argument is same.
Both A and B.
Answer: Option D

21. 
Which of the following is correct about class and structure?
class can have member functions while structure cannot.
class data members are public by default while that of structure are private.
Pointer to structure or classes cannot be declared.
class data members are private by default while that of structure are public by default.
Answer: Option D

22. 
Which of the following concepts means wrapping up of data and functions together?
Abstraction
Encapsulation
Inheritance
Polymorphism
Answer: Option B

23. 
Which of the following concepts means waiting until runtime to determine which function to call?
Data hiding
Dynamic casting
Dynamic binding
Dynamic loading
Answer: Option C

25. 

24. 
How "Late binding" is implemented in C++?
Using C++ tables
Using Virtual tables
Using Indexed virtual tables
Using polymorphic tables
Answer: Option B
Which of the following operator is overloaded for object cout?
>> 
<< 
+
=
Answer: Option B

26. 
Which of the following is the correct class of the object cout?
iostream
istream
ostream
ifstream
Answer: Option C

27. 
Which of the following cannot be used with the keyword virtual?
class
member functions
constructor
destructor
Answer: Option C

28. 
Which of the following functions are performed by a constructor?
Construct a new class
Construct a new object
Construct a new function
Initialize objects
Answer: Option D

29. 
Which of the following problem causes an exception?
Missing semicolon in statement in main().
A problem in calling function.
A syntax error.
A run-time error.
Answer: Option D

30. 
Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.
Inheritance
Polymorphism
Abstraction
Encapsulation
Answer: Option B


No comments:

Post a Comment

Please Comment Your Valuable Feedback....

You Might Also Like

Developing Data-Centric Windows Applications using Java

Developing Data-Centric Windows Applications using Java Introduction The Core Java Programming and JDBC course provides an introd...

Unlimited Reseller Hosting