www.brightbrains.in

About Us/Home         Tests On Offer           Sample Questions           FAQ           Why BrightBrains?        Contact Us

CPP
Level:-Basic
Q(1) A reference is declared using the _____ symbol.
A  &&
B  &
C  ||
D  !
Q(2) Pick out the correct statement.
A   virtual functions does not give the ability to write a templated function.
B   virtual functions does not give the ability to rewrite a templated function.
C   virtual functions does give the ability to write a templated function.
D   None of the above
Level:-Intermediate
Q(1) How can we make a class abstract?
A  By making all member functions constant.
B  By making at least one member function as pure virtual function.
C  By declaring it abstract using the static keyword.
D  By declaring it abstract using the virtual keyword.
Q(2) How to handle error in the destructor?
A   By throwing
B   By terminate
C   Both A and B
D   None of the above
Level:-Expert
Q(1) Copy constructor must receive its arguments by __________ .
A  Either pass-by-value or pass-by-reference.
B  Only pass-by-value.
C  Only pass-by-reference.
D  Only pass by address.
Q(2)
What is the output of the following program?
#include 
using namespace std;
int main()
{
int a = 5;
float b;
cout << sizeof(++a + b);
cout << a;
return 0;
}
A   2 6
B   4 6
C   2 5
D   4 5
BACK      REGISTER NOW
Terms & Conditions   Cookies Policy   Privacy Policy  
   © Copyright 2023 BrightBrains