What will be the output of following program? #include<iostream.h> void main() { float x; x=(float)9/2; cout<<x; }
|
||||||||
The term __________ means the ability to take many forms.
|
||||||||
Runtime polymorphism is achieved by
|
||||||||
Access to private data
|
||||||||
Additional information sent when an exception is thrown may be placed in
|
||||||||
A static data member is given a value
|
||||||||
What will be the result of the expression 13 & 25?
|
||||||||
In a class specifier ,data or function designated private are accessible
|
||||||||
Which of the statements are true ? I. Function overloading is done at compile time. II. Protected members are accessible to the member of derived class. III. A derived class inherits constructors and destructors. IV. A friend function can be called like a normal function. V. Nested class is a derived class.
|
||||||||
At which point of time a variable comes into existence in memory is determined by its
|
||||||||
When the compiler cannot differentiate between two overloaded constructors, they are called
|
||||||||
The actual source code for implementing a template function is created when
|
||||||||
Usually a pure virtual function
|
||||||||
Which of the following is the valid class declaration header for the derived class d with base classes b1 and b2?
|
||||||||
The process of extracting the relevant attributes of an object is known as
|
||||||||
What features make C++ so powerful ?
|
||||||||
Which of the following operator can be overloaded through friend function?
|
||||||||
The keyword friend does not appear in
|
||||||||
Exception handling is targeted at
|
||||||||
Function templates can accept
|
||||||||
If the variable count exceeds 100, a single statement that prints “Too many” is
|
||||||||
The mechanism that binds code and data together and keeps them secure from outside world is known as
|
||||||||
The operator << when overloaded in a class
|
||||||||
To
access the public function fbase() in the base class, a statement in a
derived class function fder() uses the statement.fbase();
|
||||||||
In which case is it mandatory to provide a destructor in a class?
|
||||||||
_________ members of a base class are never accessible to a derived class.
|
||||||||
What is the error in the following code? class t { virtual void print(); }
|
||||||||
It is possible to declare as a friend
|
||||||||
A struct is the same as a class except that
|
||||||||
C++ was originally developed by
|
||||||||
What is the output of the following code char symbol[3]={‘a’,‘b’,‘c’}; for (int index=0; index<3; index++) cout << symbol [index];
|
||||||||
If we create a file by ‘ifstream’, then the default mode of the file is _________
|
||||||||
The following can be declared as friend in a class
|
||||||||
The polymorphism can be characterized by the phrase
|
||||||||
A virtual class is the same as
|
||||||||
Member functions, when defined within the class specification
|
||||||||
Assume
that we have constructor functions for both base class and derived
class. Now consider the declaration in main( ). Base * P = New Derived;
in what sequence will the constructor be called ?
|
||||||||
The operator that cannot be overloaded is
|
||||||||
Which of the following declarations are illegal?
|
||||||||
Identify the operator that is NOT used with pointers
|
||||||||
Which of the following statements is NOT valid about operator overloading?
|
||||||||
Overloading a postfix increment operator by means of a member function takes
|
||||||||
Which of the following will produce a value 10 if x = 9.7?
|
||||||||
Which of the following is not the characteristic of constructor?
|
||||||||
You may override the class access specifiers
|
||||||||
You separated a derived class name from its access specifier with
|
||||||||
Consider the following statements: int x = 22,y=15; x = (x>y) ? (x+y) : (x-y); What will be the value of x after executing these statements?
|
||||||||
A friend function to a class, C cannot access
|
||||||||
The members of a class by default are
|
||||||||
If x =5, y =2 then x ^y equals________. (where ^ is a bitwise XOR operator)
|
Object Oriented Programming(OOP) Solved MCQs
4:44:00 PM299 minute read