- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
- C++ Advanced
- C++ Files and Streams
- C++ Exception Handling
- C++ Dynamic Memory
- C++ Namespaces
- C++ Templates
- C++ Preprocessor
- C++ Signal Handling
- C++ Multithreading
- C++ Web Programming
C++ Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to C++ Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Abstract class is __
A - A class must contain all pure virtual functions
B - A class must contain at least one pure virtual function
C - A class may not contain pure virtual function.
D - A class must contain pure virtual function defined outside the class.
Answer : B
Explaination
It is sufficient to have one pure virtual function in the class to make it as an abstract class.
Q 2 - From the below class choose the proper definition of the member function f().
template <class T> class abc { void f(); };
A - template <class T> void abc<T>::f() { }
B - template<class T> void abc::f() { }
Answer : A
Explaination
Q 3 - We can have varying number of arguments for the overloaded form of () operator.
Answer : A
Explaination
Q 4 - Designer of C++ programming language.
Answer : D
Explaination
Q 5 - The programs machine instructions are store in __ memory segment.
Answer : D
Explaination
Code segments holds the program instructions and fetched by instruction pointer for execution.
Q 6 - With respective to streams >> (operator) is called as
Answer : B
Explaination
It extracts the data from stream into variables.
Q 7 - i) Exception handling technically provides multi branching.
ii) Exception handling can be mimicked using ‘goto’ construct.
Answer : A
Explaination
goto just does the unconditional branching.
Answer : D
Explaination
The size of ‘int’ depends upon the complier i.e. whether it is a 16 bit or 32 bit.
Answer : B
Explaination
bool is the reserved keyword and cannot be used an identifier name.
Q 10 - What is the output of the following program?
#include<iostream> using namespace std; main() { char s[] = "Fine"; *s = 'N'; cout<<s<<endl; }
Answer : B
Explaination
*s=’N’, changes the character at base address to ‘N’.
#include<iostream> using namespace std; main() { char s[] = "Fine"; *s = 'N'; cout<<s<<endl; }
To Continue Learning Please Login
Login with Google