QN1) In Late binding the function calls gets resolved during
a) Compile Time
b) Run Time
c) Both A and B
d) None of the Above
Answer
Answer: b) Run Time
QN2) The value of EOF is
a) 1
b) 0
c) Infinity
d) -1
QN3) Using pointers to call a function is called as
a) call by value
b) call by reference
c) call by address
d) All the Above
Answer
Answer: b) call by reference
QN4) The variable that contains address of another variable is called as
a) Pointer
b) Arrays
c) Unions
d) None of the Above
Answer
Answer: a) Pointer
QN5) Inheritance in C++ have default access specifier as
a) Private
b) Public
c) Protected
d) None of the Above
Answer
Answer: a) Private
QN6) How many values can be returned by a C++ function?
a) 1
b) Infinity
c) 0
d) None of the Above
QN7) The array exforsys[10] can be declared using pointers as
a) % exforsys[]
b) & exforsys[]
c) * exforsys[]
d) @ exforsys[]
Answer
Answer: c) * exforsys[]
QN8) The variables that can be used only within the function in which it is declared is called as
a) Global Variables
b) Local Variables
c) Both A and B
d) None of the Above
Answer
Answer: b) Local Variables
QN9) The class that in C++ for file input is
a) Ifstream
b) Ofstream
c) Both A and B
d) The class that in C++ for file input is
Answer
Answer: a) Ifstream
QN10) Which of the following is an error statement in C++ array declaration?
a) int exforsys(lO);
b) float exforsys[5][5];
c) int exforsys[5];
d) None of the Above
Answer
Answer: a) int exforsys(lO);
QN11) The members of a class are by default
a) Private
b) Public
c) Protected
d) None of the Above
Answer
Answer: a) Private
QN12) The header that should be included while using manipulators in C++ is
a) iomanip.h
b) manip.h
c) if stream, h
d) None of the Above
Answer
Answer: a) iomanip.h
QN13) The header file that must be included while using cout function in a C++ program is
a) conio.h
b) math.h
c) iostream.h
d) None of the Above
Answer
Answer: c) iostream.h
QN14) The other name for external variables in C++ is
a) static variables
b) register variables
c) global variables
d) None of the Above
Answer
Answer: c) global variables
QN15) A function in a C++ program can be called
a) Only Once
b) Cannot be called at all
c) Any number of times
d) None of the Above
Answer
Answer: c) Any number of times
QN16) Which of the following denotes feature of OOPS?
a) Inheritance
b) Encapsulation
c) Polymorphism
d) All the Above
Answer
Answer: d) All the Above
QN17) What is used to convert C++ source code into object modules?
a) Compiler
b) Linker
c) Both A and B
d) None of the Above
Answer
Answer: a) Compiler
QN18) Which of the looping structure in C++ check condition at the beginning of loop?
a) do-while
b) while
c) Both A and B
d) None of the Above
QN19) A condition that must be true on exit from a member function if called as
a) Precondition
b) Post-condition
c) Both A and B
d) None of the Above
Answer
Answer: b) Post-condition
QN20) The method that is used for writing characters in C++ program is
a) put
b) get
c) write
d) None of the Above
QN21) Which of the following denote incorrect data type in C++?
a) real
b) double
c) float
d) int
QN22) The isolation of data from direct access by a C+ program is called as
a) Data Hiding
b) Data Isolation
c) Data Encapsulation
d) None of the Above
Answer
Answer: a) Data Hiding
QN23) Reference to its own class can be accepted by
a) simple constructor
b) copy constructor
c) Both A and B
d) None of the Above
Answer
Answer: b) copy constructor
QN24) What is the value of variable z when the following program segment ends? int z; for(z=0; z<50; z++) {}
a) 51
b) 49
c) 0
d) 50
QN25) The actual implementation is present in
a) declaration
b) definition
c) Both A and B
d) None of the Above
Answer
Answer: b) definition
QN26) Which of the following OOPS concepts are used with cin and cout?
a) Encapsulation
b) Data Hiding
c) Operator Overloading
d) None of the Above
Answer
Answer: c) Operator Overloading
QN27) The friend function of a class in C++ can access
a) Private members of the class
b) protected members of the class
c) Both A and B
d) None of the Above
Answer
Answer: c) Both A and B
QN28) A function defined within a class is called as
a) Member Function
b) Class Function
c) Object Function
d) None of the Above
Answer
Answer: a) Member Function
QN29) The private member in derived class
a) Cannot be inherited
b) Can be inherited at all instances
c) Can be inherited only if the derived class is inheriting from base class with private access level
d) None of the Above
Answer
Answer: c) Can be inherited only if the derived class is inheriting from base class with private access level
QN30) Which of the following denote types of polymorphism in C++?
a) Virtual function
b) Function overloading
c) Operator Overloading
d) All the Above
Answer
Answer: d) All the Above
QN31) An instance of a user-defined type is called
a) Class
b) Object
c) Method
d) None of the Above
QN32) Which of the following can be used to initialize a newly declared variable from an existing variable?
a) Virtual Function
b) Namespaces
c) copy constructor
d) None of the Above
Answer
Answer: c) copy constructor
QN33) The member functions of a class can be defined outside the class using
a) Extraction Operator
b) Insertion Operator
c) Scope resolution operator
d) None of the Above
Answer
Answer: c) Scope resolution operator
QN34) The output of operation 20%3 is
a) 6
b) 2
c) 1
d) 4
QN35) A template can be instantiated by
a) Explicit Instantiation
b) Implicit instantiation
c) Both A and B
d) None of the Above
Answer
Answer: c) Both A and B
QN36) A function named as exforsys has three implementations associated with it. This means the function exforsys is
a) Overloaded
b) Overriding
c) Both A and B
d) None of the Above
Answer
Answer: a) Overloaded
QN37) Which of the following denote bitwise operators of C++?
a) ^
b) <<
c) ~
d) All the Above
Answer
Answer: d) All the Above
QN38) Virtual functions are defined in
a) Derived class
b) Base class
c) Both A and B
d) None of the Above
Answer
Answer: a) Derived class
QN39) The data members and member functions that are only available to derived classes are
a) private
b) public
c) protected
d) None of the Above
Answer
Answer: c) protected
QN40) Which of the following remains static in a C++ program?
a) Class
b) Object
c) Both A and B
d) None of the Above
DistPub Team
Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.