Paper Solution(1 Mark)
Paper Solution(1 Mark)
1. What is POP/C?
Procedural Oriented Programming is a programming language that follows a step-by-step approach to break
down a task into a collection of variables and routines (or subroutines) through a sequence of instructions.
2. What is C++/OOP?
Object-oriented Programming is a programming language that uses classes and objects to create models
based on the real world environment. In OOPs it makes it easy to maintain and modify existing code as new
objects are created inheriting characteristics from existing ones.
6. What is Namespace?
Namespaces in C++ are used to organize too many classes so that it can be easy to handle the
application.
For accessing the class of a namespace, we need to use namespacename::classname. We can
use using keyword so that we don't have to use complete name all the time.
In C++, global namespace is the root namespace. The global::std will always refer to the namespace
"std" of C++ Framework.
8. What is Identifier?
C++ identifiers in a program are used to refer to the name of the variables, functions, arrays, or other user-
defined data types created by the programmer. They are the basic requirement of any language. Every
language has its own rules for naming the identifiers.
9. What is MIL?
Member Initialization List
Initialize List is used in initializing the data members of a class.
1. Implicit Conversion
2. Explicit Conversion (also known as Type Casting)
19. What is Single Inheritance?
If a single class is derived from one base class then it is called single inheritance. In C++ single inheritance base
and derived class exhibit one to one relation.
Now if we want to call a member function of a class with the help of pointer to object than it is possible
by two ways:
Arrow ( -> ) Operator (Member Access Operator ->)
Dot ( . ) Operator
Stream classes in C++ are used to input and output operations on files and io devices. These classes have
specific features and to handle input and output of the program.
Syntax:
template <class T>
class className
{
private:
T var;
... .. ...
public:
T functionName(T arg);
... .. ...
};
46. The member function inside the body of the class is automatically become.
Private
47. Friend function can access any private member (true / false)
A function which can access all the private, protected and public members of a class.
Answer is true
49. When class is derived from more than one from of inheritance then it called
___________
Multiple Inheritance
55. The base class for most stream classes is the class.
ios class
60. To use the setw manipulator, you have to include the _________ header file.
iomanip.h
66. The destructor is written by specifying a ____________ SIgn before its name.
~
67. Operator overloading is also known by the term ____________.
Compile time
68. Overloading a unary operator using member function will require ________
arguments.
No arguments
71. Which function returns the current position of the output pointer?
tellg() function