Paper was little bit tough because over all paper was conceptual and not from past papers.
40 mcqs
Q1.Explain Vector ivec(4,3)?
Q2.Describe key components of STL?
Q3.Give tempalte of function to print value of any type?
Q4.
2.Consider the code below,
template< typename T >
class T1 {
public:
T i;
protected:
T j;
private:
T k;
friend void Test();
};
This code has a template class T1 with three members i,j and k and a friend function Test(), you have to
describe which member/s of T1 will be available in function Test().
Q5.What is Graceful termination write C++ code?
Q6.
What would be the output of this code?
class mother {
public:
mother ()
{ cout "mother: no parameters\n"; }
mother (int a)
{ cout "mother: int parameter\n"; }
};
class daughter : public mother {
public:
daughter (int a)
{ cout "daughter: int parameter\n\n"; }
};
class son : public mother {
public:
son (int a) : mother (a)
{ cout "son: int parameter\n\n"; }
};
int main () {
daughter rabia (0);
son salman(0);
return 0;
}
and some more questions about overloading and destructors and output of the codes.....
Comments
Post a Comment
Please give us your feedback & help us to improve this site.