++p; What are the two advantage of function objects than the function call ? } return; #include X* ptr2 = new(0) X; *pSpeed = 2; catch (int n) public: int n2 = sizeof(arr2)/sizeof(arr2[0]); void myfunction () throw (int,bad_exception) return 0; int main() Test1 * var = NULL; return 0; try protected: class Coutput #include { int getInt(); } } *ptfptr) (20); cout<. { class SimpleContainer #include }; int arr2[5] = {6,7,8,9,10}; using namespace std; public: #include using namespace std; deque a (3,100); { #include int arrMin(T arr[], int n) int main() { { #include using namespace std; myType& operator()(size_t x, size_t y) template }; transform ( numbers, numbers + 3, numbers, negate() ); { for (n=0; n. How many ways of reusing are there in the class hierarchy ? cout << sizeof(b) << endl; count += iterator ->* fruit; { { cout << "2"; return 0; int area() try vector myvector; Box b(10); vi.push_back(5); } #include int x = -1; #include What happens when no argument is supplied to flip() function ? { }; #include int j;

} #include const int bsize = 512; { { pair :: iterator, int*> mypair; k = max(i, j); using namespace std; cout << "DerivedOne using namespace std; using namespace std; public: void string_permutation( string& orig, string& perm ) tp = make_tuple(4, '1', "Hello"); cout << "test:"; int second[] = {50, 40, 30}; Which function is used to get the argument of a complex number ? }; class A }, What will be the output of the following C++ code cout << "Class A" << endl; { #include { return 0; int b; public: Pick out the in correct type of function in header file ? }, What will be the output of the following C++ code n = max(l, m); float xx = 2.1; bitset<8> b1(95); '; a.g(); }; a.test(); cout<. } #include { }, What will be the output of the following C++ code for (int i = 1; i <= 10; i++) using namespace std; } { tst.insert(12); { using namespace std; for (size_t i = 0; i < vi.size(); ++i) } int main() Pick out the correct statement about vector ?

Display(vi); cout

class BaseClass cout << "Size of a " << int(a.size()) << ' #include int area () int value; cout << "X :: operator new(size_t)" << endl; Which operator is used to take OR of two bitset variables ? throw "Division by zero condition! using namespace std; return (a / b); { public: cout << "Template Called "; { #include #include int operator()(int a){ using namespace std;

{ }. }, What will be the output of the following C++ code { How the template class is different from the normal class ? Pick out the correct statement about the override ? { int main() template<> class A }, What will be the output of the following C++ code #include using namespace std; { advance (it, 3); } struct A name += " Apple "; { using namespace std; int a = 5; result = x * x; }; using namespace std;

j = x; template type Funct1(type Var1) How many kinds of parameters are there in C++ ? using namespace std; using namespace std; } }, What will be the output of the following C++ code class B: public A

#include } class A #include void Funct() mypq.push(20); V z; array arr1; public: #include int main() try else void printChar(); string str ("I like to code in C"); void f(int b) do { template cout << internal << n << endl; using namespace std; int main () int *p = new int[size]; cout << one << endl; if (p == 0) public: ", divresult.rem); p = fopen ("myfile.txt", "r"); cout << str.capacity() << " { puts ( "success" ); class statement:public student,public sports ostream_iterator out_it (cout,", "); } void func1() else Child2 (void) }; virtual void Display() = 0;

cout<. catch (bad_cast) using namespace std; }, What will be the output of the following C++ code cout<(tp)<(tp)<(tp)<. template { #include template

#include What is the use of includes function in c++ ? string str3 = str.substr (pos);

vector fourth (third); multimap :: iterator it = mymultimap.begin(); } #include cout << myints.getmember(0) << ' cout << Var2.Funct2(3.123) << endl; public: { void operator delete(void* p) it != myvector.end(); ++it) Virtual functions in C++ tells the compiler to perform ______________________ on such functions ?

private: using namespace std; }, What will be the output of the following C++ code cout << ' ' << *it; { What is the name of the container which contains group of multiple objects ? int main() MyFunc(256); float f; using namespace std; }, What will be the output of the following C++ code try Test Var1; return a/b;

#include } func1(); template { } public:

class A for(int i=0;i<5;i++) using namespace std; return 0; using namespace std; { enum { size = 3};

What will the max function in the numeric limit will return for type float ? int myints[] = {10, 20, 30, 40, 1024}; void display() delete[ ] ptr; { { vector ar = { 1, 2, 3, 4, 5 }; using namespace std; DerivedOne one; }. How does the limits.h header file can be represented in C++ ? cout << *it; { int main() A(int a): x(a) {} }; Which header file is required to use any container ? { if(b == 0){

const char *one = "Test"; try throw myex; } }, What will be the output of the following C++ code #include }. mymultimap.insert(make_pair('z', 500));

friend struct Z;

{ int main(int argc, char const *argv[]) }, What will be the output of the following C++ code int main () #include } };

"; cout << ' ' << *p; char mya[20]= "Hello world"; return 0; '; When does the next sequence point start ? return 0; using namespace std; }; Which keyword is used to represent a friend function ? { }. { cout << " How many parameters can a resize method take ? { } void terminator()

void g(X* x); }, What will be the output of the following C++ code cout<. { { #include } hat will be the output of the following C++ code public: using namespace std; throw "Out of memory! do cout << arrMin(arr2, n2); #include cout << mystring << endl; A(){ } while (str[i]) public: return 0; }, What will be the output of the following C++ code { Which of the following advantages we lose by using multiple inheritances ? ptr = next(ptr, 3); perror ("Error opening file"); cout << q.front(); }, What will be the output of the following C++ code

{

}. '; cout << *it << " "; } How many types of the constructor are there in C++ ? int main () { What is the use of RAII in c++ programming ? cout<, What will be the output of the following C++ code

{ mylist.push_back (i * 10); #include What is the type of the first item in the heap ? What will be the output of the following C++ code { #include throw Fruit(); { } }, What will be the output of the following C++ code using namespace std; Which operator is used as catch-all handler ? Indexing of bitset variables starts from ? { public: { cout << "Instantiating Derived" << endl; for (i = test4.begin(); i != test4.end(); ++i) bool operator() (double first, double second) int main () vector myvector (5); #include

any var(val); #include string str ("Steve jobs"); int x; #include break; using namespace std; { Which is the best design choice for using pointer to member function ? return j * getInt(); #include void operator delete(void* p)

class A containers[p].traverse(); return 0; } cout<. #include public: class Foo using namespace std; void m_func1() #include using namespace std; { { q.push('a'); #include int main(int argc, char const *argv[]) using namespace std; { #include using namespace std; for (int i = 1; i < 6; i++) myvector.push_back (i * 10); What is the use of fill() function in array class ? { return 0; #include int main () }, What will be the output of the following C++ code { #include cout<, What will be the output of the following C++ code return (i%2)==1; int n; What is the correct function prototype of () operator overloading ? "; void output1::output (int i) using namespace std; What is the use of the flip function in bitset ? public: { cout << "Data accessed"; cout << ' ' << *it; { : B(n, d) Which of the following statements are correct about Catch handler if (x > 0) cout << vi[i]; cout << result.first[i] << " "; { #include eat_memory(size); cp -> f(); #include int main () #include }

vector v;

What will be the output of the following C++ code public:

} mymap['a'] = 50; Which type of heap is implemented in STL heap ? { }. What will happen when introduce the interface of classes in a run-time polymorphic hierarchy ? #include vector v; What will be the output of the following C++ code #include class sample cout << endl; return 0; { virtual const char* what() const throw() T func(T a)

buffer[location].filled = true; return 0; vector v(10, 2); } { }; float val = 5.5; struct b { #include #include ===================== } { Multiple both; { }. myset.erase(myset.begin()); try

}; int main() set_unexpected (myunexpected); } How one can restrict a function to throw particular exceptions only ? }, What will be the output of the following C++ code void Coutput::output(int i) What is the use of the finally keyword ? throw " ptr is NULL "; What is the correct syntax of declaring an array class ? return 0; return (i==j); using namespace std; Valarray varr = { 10, 2, 20, 1, 30 }; class A } #include { }, What will be the output of the following C++ code unsigned int i; Subsequent elements are moved in terms of _____ when an element in inserted in vector ? for(int i=0;i<5;i++) ~Test() Which of the following will return the new element at the end of container ? templateclass clsTemplate mys.str(dat);

}; DerivedTwo two; What will be the output of the following C++ code What will be the output of the following C++ code forward_list fl1 = {1,2,3,4,5};

In nested try catch blocks, if both inner and outer catch blocks are unable to handle the exception thrown, then ? mydeque.push_back ( 20 ); using namespace std; '; throw 20;

for (int i = 1; i <= 5; i++) using namespace std; XYZ b; cout<, What will be the output of the following C++ code public: {

int main(int argc, char const *argv[]) int i = 0; How many specifiers are used to derive a class ? } } int main () int a; }, What will be the output of the following C++ code in the text file ptr = new char[size_t(0) / 3]; Which is used to check the error in the block ? public: How many iterators are needed for the defining a new container ? Cat f; int main () }; *i = 3; mypq.push(25); void value_of_a(){ What will be the output of the following C++ code public: { }. cout << " cerr << e.what() << endl; { };

#include #include What do input and output objects support ?

mymap.erase (mymap.find('d'));

#include #include With which does the trigonometric functions work with angles in c++ ? return 0; #include return 0; { for (int i = 1; i < 10; ++i) myvector.push_back(i); Which function is used to return the minimum element in the range ? cout<::iterator ptr = fl1.begin(); #include { A a; template }, What will be the output of the following C++ code ================== a.push_back (i * 10); try Which header is need to be used with function objects ? for (int i = 1; i <= 5; i++) if (d < 0.0) list firstlist, secondlist; #include T max(T x, T y) int cx = 0; cout

{ { any var(s); }; using namespace std; class poly } myfunction(); }, What will be the output of the following C++ code In which type of storage location are the vector members stored ? return 0; }. ptr3->number = 10001; vector b (5, 0); mys.seekp(-7,ios::end); { }; cout << "Outer Catch B b;

{ int second[] = {50, 40, 30, 20, 10}; return 0; void print_mydata(T output) cout << "caught other exception vector fifth (myints, myints + sizeof(myints) / sizeof(int) ); double d; { protected: sort (second, second + 5); int* p = myvector.data(); array[x] = array[y]; static int const ConsoleHeight = 25; ptr = new char[size_t(0) / 3]; What will be the output of the following C++ code printf ("%d v2.push_back(i); What will be the output of the following C++ code cout << "All numbers are not even template T multIt(T x)

for (it = v.begin(); it != v.end(); ++it) { { { void sampleContainerInterfacing(); #include printf ("%ld What is the use of log() function in a complex ? { } cout<. for (i = v.begin(); i != v.end(); ++i) void print() const What will be the output of the following C++ code array[ i ] -> print(); #include using namespace std; deque :: iterator it; tuple tp1; test.insert(test.end(), "one"); class Base1 { { { cout << c << " "; #include #include { network neural ai logic equivalent networks linear 2009 gates below use output shown seen inputs