Menu
Popular Courses
Search

MCQs


Total Questions : 76 | Page 3 of 8 pages
Question 21.

The process of building new classes from existing one is called ______.


  1.    Polymorphism
  2.    Structure
  3.    Inheritance
  4.    Cascading
 Discuss Question
Answer: Option C. -> Inheritance


Question 22.

If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access


  1.    protected and public data only in C and B.
  2.    protected and public data only in C.
  3.    private data in A and B.
  4.    protected data in A and B.
 Discuss Question
Answer: Option D. -> protected data in A and B.



Question 23.

In C++, dynamic memory allocation is accomplished with the operator ____


  1.    new
  2.    this
  3.    malloc()
  4.    delete
 Discuss Question
Answer: Option A. -> new


Question 24.

The operator that cannot be overloaded is


  1.    ++
  2.    ::
  3.    ()
  4.    ~
 Discuss Question
Answer: Option B. -> ::



Question 25.

What is the output of the following code



char symbol[3]={‘a’,‘b’,‘c’};
for (int index=0; index<3; index++)
cout << symbol[index];


  1.    a b c
  2.    â€œabc”
  3.    abc
  4.    â€˜abc’
 Discuss Question
Answer: Option C. -> abc



Question 26.

A function call mechanism that passes arguments to a function by passing a copy of the values of the arguments is __________


  1.    call by name
  2.    call by value
  3.    call by reference
  4.    call by value result
 Discuss Question
Answer: Option B. -> call by value



Question 27.

Which of the following statement is valid?


  1.    We can create new C++ operators.
  2.    We can change the precedence of the C++ operators.
  3.    We can change the associativity of the C++ operators.
  4.    We can not change operator templates.
 Discuss Question
Answer: Option D. -> We can not change operator templates.



Question 28.

You can read input that consists of multiple lines of text using


  1.    the normal cout
  2.    the cin.get( ) function with one argument
  3.    the cin.get( ) function with two arguments.
  4.    the cin.get( ) function with three arguments.
 Discuss Question
Answer: Option C. -> the cin.get( ) function with two arguments.



Question 29.

What will be the output of following program?
#include<iostream.h>
void main()
{
float x;
x=(float)9/2;
cout<<x;
}


  1.    4.5
  2.    4.0
  3.    4
  4.    5
 Discuss Question
Answer: Option A. -> 4.5


Question 30.

RunTime polymorphism is achieved by ___________


  1.    friend function
  2.    virtual function
  3.    operator overloading
  4.    function overloading
 Discuss Question
Answer: Option B. -> virtual function



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
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 3.1 : Overview of Finance & Acco Chapter 3 : Finance & Accounts SAIL E0 - GFM 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management SAIL E0 - GFM 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management SAIL E0 - GFM 2024
GPOE / GPA Combined 1 Free CBT Mock Test SAIL E0 2024
CBT Mixed Test 1 GPOE/GPA SAIL E0 2024