Sr. # | Questions | Answers Choice |
---|---|---|
1 | The first parameter of overloaded stream insertion operator is _________ where second parameter is _______ . | input stream, object of class object of class, output stream output stream, object of class object of class, input stream |
2 | Unary operator implemented as member function takes ____ arguments whereas non-member function takes _____ arguments. | One, zero Zero, one One, two Two, one |
3 | Structure is a collection of ______________ under a single name. | Only Functions Only Variables Both Functions and Variables None of the given options |
4 | Which of the following is used with bit manipulation? | Signed integer Un-signed integer Signed double Un-signed double |
5 | For which values of the integer _value will the following code becomes an infinite loop? int number=1; while (true) { cout << number; if (number == 3) break; number += integer_value; }. |
any number other than 1 or 2 only 0 only 1 only 2 |
6 | The number 544.53 must be stored in _____ data type. | int short float (Sure) char |
7 | To include code from the library in the program, such as iostream, a directive would be called up using this command. | #include “iostream.h” include <iostream.h> include <iostream.h> #include <iostream.h> |
8 | What is the sequence of event(s) when deallocating memory using delete operator? | Only block of memory is deallocated for objects Only destructor is called for objects Memory is deallocated first before calling destructor Destructor is called first before deallocating memory |
9 | All preprocessor directives are started with the symbol______. | * + @ # |
10 | Pointer is a variable which store | Data Memory Address Data Type Values |
11 | A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this _______________ | Write a separate class to handle each Use templates Use strings to store all types None of the given options |
12 | Structured Query Language is used for ______________ | Databases Management Networks Writing Operating System none of the given options |
13 | A template function must have | One or more than one arguments Only one argument Zero arguments None of the given options |
14 | Every class contains _______________. | Constructor Destructor Both a constructor and a destructor None of the given options |
15 | Which value is returned by the destructor of a class? | A pointer to the class An object of the class A status code determining whether the class was destructed correctly Destructors do not return a value. |
16 | Classes defined inside other classes are called ________ classes. | looped nested overloaded none of the given options |
17 | While calling function, the arguments are assigned to the parameters from _____________. | left to right right to left no specific order is followed none of the given options |
18 | The first parameter of operator function for << operator, | Must be passed by value Must be passed by reference Can be passed by value or reference Must be object of class |
19 | What will be the correct syntax to declare two-dimensional array of float data type? | float arr{2}{2} ; float arr[2][2] ; float arr[2,2] ; float[2][2] arr ; |
20 | Consider the following code segment. What will be the output of the following program? int func(int) ; int num = 10 ; int main(){ int num ; num = 5 ; cout << num ; cout << func(num) ; } int func(int x){ return num ; } | 5, 5 10, 5 5, 10 10, 10 |