In Late binding the function calls gets resolved during

Compile Time

Run Time

Both A and B

None of the Above

Ans B The value of EOF is

1

0

Infinity

-1 Ans d What is the notation used to place block of statements in a looping structure in C++?

% %

( )

{ }

None of the Above Ans c The notation of member access operator in structures is

&

.

$

* Ans b Using pointers to call a function is called as

call by value

call by refe rence

call by address

All the Above Ans b

The variable that contains address of another variable is called as

pointer

arrays

unions

None of the Above

Ans a Inheritance in C++ have default access specifier as

private

public

protected

None of the Above Ans a How many values can be returned by a C++ function?

1

infinity 0 None of the Above Ans a Which of the following denote library function in C++? isalpha isdigits isspace All the Above Ans d The array exforsys[10] can be declared using pointers as % exforsys[] & exforsys[] * exforsys[] @ exforsys[] Ans c Which of the following is mandatory for all C++ program? main() scanf() system() All the Above Ans a The variables that can be used only within the function in which it is declared is called as Global Variables .

int exforsys[5]. float exforsys[5][5]. Ans b The members of a class are by default private public protected None of the Above Ans a The header that should be included while using manipulators in C++ is .Local Variables Both A and B None of the Above Ans b The class that in C++ for file input is ifstream ofstream Both A and B The class that in C++ for file input is Ans a Which of the following is an error statement in C++ array declaration? None of the Above int exforsys(10).

h math.h None of the Above Ans a The header file that must be included while using cout function in a C++ program is conio.h ifstream.h None of the Above Ans c The other name for external variables in C++ is static variables register variables global variables None of the Above Ans c The notation of ternary operator is & ?: ~ % Ans b Which of the following denote stream classes in C++? .h iostream.h manip.iomanip.

ios fstream ostream All the Above Ans d Pure virtual function in C++ is one in which the virtual function has no body has at least one member which cannot be inherited None of the Above Ans a The notation used for representing destructor in C++ program is ! & * ~ Ans d Which of the following denote newline character in C++ program? '/nc' 'nc' '/n' '\n' Ans d A function in a C++ program can be called .

! None of the Above Ans c In a C++ program each statement is ended with the character . .Only Once Cannot be called at all Any number of times None of the Ab ove Ans c The notation of logical NOT operator in a C++ program is : . * : Ans b Which of the following denote insertion operator in C++? & < << ! .

Ans c (important) Which of the following denotes feature of OOPS? Inheritance Encapsulation Polymorphism All the Above Ans d What is used to convert C++ source code into object modules? Compiler Linker Both A and B None of the Above Ans a Which of the looping structure in C++ check condition at the beginning of loop? do-while while Both A and B None of the Above Ans b A condition that must be true on exit from a member function if called as Precondition Post-condition .

Both A and B None of the Above Ans b Comments in C++ program is written by using / / // /* /* * * Ans b cin in C++ program uses the operator >> < << > Ans a Which of the following denote C++ looping statement? while do-while for All the Above Ans d What is the keyword used to allocate memory in C++? assign .

malloc new None of the Above Ans c What is the minimum number of times a do loop would definitely get executed? 0 1 Infinity Could not be predicted Ans b Which of the following notation compares two variables X and Y? X==Y X=Y X!=Y X equals Y Ans a Which of the following statements are TRUE? Reference variables must be initialized in C++ Array of reference is possible Both A) and B) None of the Above Ans a The method that is used for writing characters in C++ program is .

put get write None of the Above Ans a The variables that are used to represent individual array element in an array is called as Pointer Variable Subscripted variable Index Variable Real Variable Ans b In C++ the function that is used to release the block of memory already used is release deallocate delete All the Above Ans c Which of the following denote incorrect data type in C++? real double float int .

Ans a Which of the following functions are used in dynamic memory handling in C++? new delete Both A and B None of the Above Ans c Which of the following is allowed for the value of subscript variable? Positive Integer Negative Integer Both A and B Float Ans a The isolation of data from direct access by a C+ program is called as Data Hiding Data Isolation Data Encapsulation None of the Above Ans a Which of the following is used to store data of different types? Arrays Structures Both A and B .

objects and functions under a name? Area named Namearea .None of the Above Ans b The operator that denotes address of a variable in C++ program is * % $ & Ans d If an array in C++ is declared as exforsys[10] then exforsys is equal to &exforsys[0] &exforsys[9] *exforsys[0] None of the Above Ans a Which of the following is returned by the operating system if a C++ program completes successfully? No Value Returned -1 1 0 Ans d Which of the following is used to group a set of g lobal classes.

double y) has return type as double int float None of the Above Ans b Which of the following language given below us es the concepts of OOPS? C++ Java C# All the Above Ans d A variable modified by multiple threads should be declared as global .Namespaces None of the above Ans c The class with name exforsys and having integer data x in its have constructor name as exforsys x any name None of the Above Ans a The function named as exforsys declared as int exforsys(float x.

z++) {} 51 49 0 50 Ans d The actual implementation is present in declaration definition Both A and B None of the Above Ans b . for(z=0.static volatile Ans c None of the Above (important) Reference to its own class can be accepted by simple constructor copy constructor Both A and B None of the Above Ans b What is the value of variable z when the following program segment ends? int z. z<50.

Strict parameter type checking is followed with which of the following? Inline Macros Both A and B None of the Above Ans a When dynamically allocated memory is lost to the C++ program then warning occurs memory leak occurs The program executes successfully None of the above Ans b Which of the following OOPS concepts are used with cin and cout? Encapsulation Data Hiding Operator Overloading None of the Above Ans c The friend function of a class in C++ can access Private members of the class protected members of the class Both A and B .

None of the Above Ans c A function defined within a class is called as Member Function Class Function Object Function None of the Above Ans a The private member in derived class Cannot be inherited Can be inherited at all instances Can be inherited only if the derived base class with private access level class is inheriting from None of the Above Ans c (important) Which of the following denote types of polymorphism in C++? Virtual function Function overloading Operator Overloading All the Above Ans d An instance of a user -defined type is called Class Object Method .

None of the Above Ans b Which of the following denote operator of logical AND? && ^& !& & Ans a Which of the following denotes growable array? Vector ArrayList Both A and B None of the Above Ans c Which of the following can be used to initialize a newly declared variable from an existing variable? Virtual Function Namespaces copy constructor None of the Above Ans c The vtable entry for a pure virtual function in C++ is zero NULL .

one No Entry in vtable Ans b Class that reads and writes to an array in memory is ostream ifstream strstream None of the Above Ans c Mutable keyword can be applied to non-static data members of a class non-const data members of a class Both A and B None of the Above Ans c (imp) The member functions of a class can be defined outside the class using Extraction Operator Insertion Operator Scope resolution operator None of the Above Ans c Objects have .

behavior state Both A and B None of the Above Ans c Which of the following operators cannot be overloaded? sizeof :: :? All the Above Ans d The output of operation 20%3 is 6 2 1 4 Ans b Which of the following is used in C++ to create a copy of an object? Assignment operator Copy constructor Both A) and B) None of the Above .

Ans b RAiI stands for Read Acquisition is Initialization Resource Acquisition is Initializer Resource Acquisition is Initialization None of the Above Ans c Which of the following exists in C++? virtual destructor virtual constructor Both A and B None of the Above Ans a A template can be instantiated by Explicit Instantiation Implicit instantiation Both A and B None of the Above Ans c (imp) The inserting of the code of a called function at the point where the function gets called is achieved by using Inline functions virtual functions .

Both A and B None of the Above Ans a The new operator in C++ Initialize the allocated memory Allocates memory for the object Both A and B None of the Above Ans c (imp) The block of memory allocated by the new is released by using delete realloc Both A and B None of the Above Ans a Which of the following denotes advantages of operator overloading? Operator not limited to operate only with primitive Data Type Extensibility Both A and B None of the Above Ans c A function named as exforsys has three implementations associated with it. This means the function exforsys is overloaded .

Overriding Both A and B None of the Above Ans a Which of the following denote bitwise operators of C++? ^ << ~ All the Above Ans d The notation of scope resolution operator is * : :: None of the Above Ans c Virtual functions are defined in Derived class Base class Both A and B None of the Above Ans a The data members and member functions that are only available to derived classes are .

private public protected None of the Above Ans c(???) For the class exforsys defined as below: class exforsys() { }. } Which of the following is TRUE? No default constructor is provided by the compiler The compiler provides the default constructor The compiler generates error None of the Above Ans b Which of the following remains static in a C++ program? Class Object Both A and B None of the Above Ans a Which of the following allocates memory but does not initialize it? new operator operator new Both A and B None of the Above . int main() { exforsys a.

Ans b (imp) Which of the following includes the concept of derived classes in C++? Encapsulation Polymorphism Inheritance None of the Above Ans c When object of the first class is instantiated then which of the following is called? Destructor Constructor Both A and B None of the Above Ans b The overriding method must have the which of the following same as that of the method in the super class definition same identifier same signature Both A and B None of the Above Ans c (imp) Index of an array starts from One Zero Two .

None of the Above Ans b Value is given to a variable using conditional statement assignment statement looping statement None of the Above Ans b Which of the following denote advantages of inheritance? saves program development time code reusability Both A and B All the Above Ans c If a function in C++ does not return a value then its return type is denoted as float void int None of the Above Ans b The first fully Object -oriented language is Java .

C++ Simula None of the Above Ans c .

Sign up to vote on this title
UsefulNot useful