Menu
Popular Courses
Search

MCQs


Total Questions : 76 | Page 6 of 8 pages
Question 51.

Mechanism of deriving a class from another derived class is known as____


  1.    Polymorphism
  2.    Single Inheritance
  3.    Multilevel Inheritance
  4.    Message Passing
 Discuss Question
Answer: Option C. -> Multilevel Inheritance



Question 52.

The break statement causes an exit


  1.    from the innermost loop only.
  2.    only from the innermost switch.
  3.    from all loops & switches.
  4.    from the innermost loop or switch.
 Discuss Question
Answer: Option D. -> from the innermost loop or switch.



Question 53.

Maximum number of template arguments in a function template is


  1.    one
  2.    two
  3.    three
  4.    many
 Discuss Question
Answer: Option D. -> many



Question 54.
If the variable count exceeds 100, a single statement that prints “Too many” is
  1.    if (count
  2.    if (count>100) cout >> “Too many”;
  3.    if (count>100) cout
  4.    None of these.
 Discuss Question
Answer: Option C. -> if (count>100) cout



Question 55.

Additional information sent when an exception is thrown may be placed in


  1.    the throw keyword.
  2.    the function that caused the error.
  3.    the catch block.
  4.    an object of the exception class.
 Discuss Question
Answer: Option C. -> the catch block.



Question 56.

If we store the address of a derived class object into a variable whose type is a pointer to the base class, then the object, when accessed using this pointer.


  1.    continues to act like a derived class object.
  2.    Continues to act like a derived class object if virtual functions are called.
  3.    Acts like a base class object.
  4.    Acts like a base class, if virtual functions are called.
 Discuss Question
Answer: Option B. -> Continues to act like a derived class object if virtual functions are called.



Question 57.

The address of a variable temp of type float is


  1.    *temp
  2.    &temp
  3.    float& temp
  4.    float temp&
 Discuss Question
Answer: Option B. -> &temp



Question 58.

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?


  1.    22
  2.    37
  3.    7
  4.    Compile Error
 Discuss Question
Answer: Option B. -> 37



Question 59.

A friend function to a class, C cannot access


  1.    private data members and member functions.
  2.    public data members and member functions.
  3.    protected data members and member functions.
  4.    the data members of the derived class of C.
 Discuss Question
Answer: Option D. -> the data members of the derived class of C.



Question 60.

A variable defined within a block is visible


  1.    from the point of definition onward in the program.
  2.    from the point of definition onward in the function.
  3.    from the point of definition onward in the block.
  4.    throughout the function.
 Discuss Question
Answer: Option C. -> from the point of definition onward in the block.



Share this page with your friends!

Share this page with your friends!

Latest Videos

Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test Part 1 Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP Part 1 : (14-02-2024) GPOE 2024
Cube & Cuboid Part 1 Reasoning (Hindi)
Data Interpretation (DI) Basic Concept Reasoning (Hindi)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths
Real Numbers Part 1 Class 10 Maths
Polynomials Part 1 Class 10 Maths

Latest Test Papers

Chapter 1.1 : INTRODUCTION Chapter 1 : Raw Material Handling Plant GPOE/GPA 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management GFM 2024
Chapter 3.1 : INTRODUCTION Chapter 3 : Sinter Plant GPOE/GPA 2024
Chapter 2.3 : COAL HANDLING PLANT - Set Chapter 2 : Coke Ovens and Coal Chemicals GPOE/GPA 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management GFM 2024