Final Term Paper Spring2011Introduction to ProgrammingQ:1 Write down the types of templates ?
Q:2Const int*ptr=&x;
Explain this statement?
Q: 3Write the output of the given function
Q:4If we want to send the data by reference and don’t want the original data to be affected?
Q:5Write the operator function in stream >> extraction . of the following code.
Q:6What is shallow copy ? (2Marks)
Q:7 (3Marks)
Data encapsulation & data hiding.
Q:8 which one is copy constructor and which one is assignment operator ?
Q:9 marks(5Marks)
How we difference b/w reference variable and an address of variable.
Q: 10 marks(5Marks)
Int number=1;
While(true)
{
Cout<
If(number==3)
Break;
Number+=vaule;
}
rewrite this code by using for loop.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><> Q:1What is conversion constructor ?
Q:2What will be the output of following code if user input a number 123
Int input;
Cin>>oct>>input;
Cout<
From past papers
Q:3Write down the meaning of line given below line code where m is an object of class martrix
If(&m!=this)
Q:4Difference b/w switch statement & if statement ?
Q:5Write down the general syntax for operator function ?
Q:6What one (copy constructor or assignment operator ) will be called in each following code segment ?
Q:7 See the following code segment
Template
Class myclass
{
Private :
Tx;
Public
Myclass(ta)
{
X=a;
};
Write the main function which creates two objects of class for int & double types?
Q:8
Write the output of following program
Q:9 what is meant by life time of a variable what is lifetime of automatic variable ?
Q:10
Describe the purpose of using break statement in the conditional statement