My today's CS201 Paper 22-07-2011
Suppose there is class A having data member 'x', 'y' and an object of class B. The class
B has data members 'z'. Write the constructor of a class A that initializes the data
members of class A and class B (using member initializing list). [2]
How can we declare and initialize static data members of a class? [2]
Write down the general syntax for a function that returns a reference? [2]
Differentiate between single-dimensional and multi-dimensional array? [2]
How many arguments does binary member operator function binary non-member
operator function take? [3]
What is an alternative of setw manipulator? [3]
Find the error in the given code [3]
for (int i=0; i<numRows; i++)
{
for (int j=0; j<numCols; j++)
}
elements[i,j] =m.elements [i][j];
}
}
Determine the output of following code segment. [3]
x=5;
Switch (x)
{
case 5;
cout<<Value is 5;
case 4;
cout<<Value is 4;
break;
}
What is meant by the lifetime of a variable and what is the lifetime of an automatic
variable? [5]
Write a short note on files and also explain how they are handled in C++? [5]
Find the error [5]
class Data
{
private:
const in data;
public:
Data( )
{
cout<<"Constructor Call…\n"; }
void getIncreament( )
{
Cout<<"Data = " <<++data;
}
};
void main( )
{
char*String ;
String= New char[15];
String="Welcome to VU";
cout<<String;
free (String);
}
I Hate Spammers Don't Make Me Angry
--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en
No comments:
Post a Comment
PLEASE COMMENT ABOUT YOUR VISIT AND MY SITE
Note: Only a member of this blog may post a comment.