C Plus Plus 2016
C Plus Plus 2016
•. Pi
111111111111111111111I1111111111111111111I1111111I11111111111111111III
~ I - O. 0 1 - 0 0 3 .3 Ci 9 •.
#include <iostream.h>
int main ()
{
int a;
a = 5+3 * 5;
cout « a;
return 0;
}
&
(9) What will be output of following code?
#include <iostream>
class Base
{
Public:
virtual void show ()
{
cout «"In Base \n"
}
}
Class Derived public Base
{
Public
void show ()
{
cout « "Inderived \n";
}
};
int main ()
{
Base * b = new Derived;
b --) show 0; /IRUN-TIME POLYMORPHISM
return 0;
}
(10) How protected keyword is useful?
(11) What is destructor? How many destructors can be
declared in programming ?
(12) How can we access private member function of the
class?
(13) How overloading of template function occurs ?
--------------------~i~$••~~
~1",'i;f'
i~'
.
3 (a) Give answers of the following' : (any three) 6
(1) What is call by reference ?
(2) Explain the use of scope resolution operator?
(3) What are nesting of functions ?
(4) What are Operators in C++ ? Explain scope
resolution operator.
(5) What is function overloading and overriding ?
(6) Explain rules. for operator overloading.
MAT-003-003309 ] 4 [ 58001148-136 ]
&