Question 1 of 25
Hints left: 3
Q1
In which of the following relationship objects of related classes are strongly dependent?
Q2
What is the correct function prototype of () operator overloading?
Q3
Pick out the correct statement about the override.
Q4
How many instances are allowed by map and set while inserting an element into container?
Q5
What will be the output of the following C++ code? #include <iostream> using namespace std; void test(int x) { try { if (x > 0) throw x; else throw 'x'; } catch(int x) { cout<<"integer:"<<x; } catch(char x) { cout << "character:" << x; } } int main() { test(10); test(0); }
Q6
By using which operator does point to next element is represent in iterator?
Q7
Which of the following is a Modifying Sequence Operation?
Q8
What do maps and sets support?
Q9
What will be the output of the following C++ code? #include <iostream> #include <exception> using namespace std; void terminator() { cout << "terminate" << endl; } void (*old_terminate)() = set_terminate(terminator); class Botch { public: class Fruit {}; void f() { cout << "one" << endl; throw Fruit(); } ~Botch() { throw 'c'; } }; int main() { try { Botch b; b.f(); } catch(...) { cout << "inside catch(...)" << endl; } }
Q10
Pick out the incorrect static function member in numeric limits.
Q11
What is the use of type() function in any container?
Q12
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int n = 15; for ( ; ;) cout << n; return 0; }
Q13
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int var = -12; try { cout<<"Inside try\n"; if (var < 0) { throw var; cout<<"After throw\n"; } } catch (int var ) { cout<<"Exception Caught\n"; } cout<<"After catch\n"; return 0; }
Q14
Which of the following(s) can be used to access the first element of a vector v?
Q15
What will be the output of the following C++ code? #include<iostream> #include<any> using namespace std; int main() { float val = 5.5; any var(val); cout<<var.type().name()<<endl; return 0; }
Q16
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int i; for (i = 0; i < 10; i++); { cout << i; } return 0; }
Q17
What header file is included to use array classes?
Q18
How many ways are there for constructing a bitset?
Q19
Composition is also a type of . . . . . . . . relationship.
Q20
Which header file is required to use get() function?
Q21
What must be an operand of operator delete?
Q22
Which of the following is correct about Functors?
Q23
What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; int main () { string mys; char mya[20]= "Hello world"; mys = mya; cout << mys << '\n'; return 0; }
Q24
Which of the following is corect way of constructing bitset using binary string?
Q25
How many iterators are needed for the defining a new container?