My Today's CS201 Paper 22-07-2011

0 views
Skip to first unread message

سیٌد عمر شاہ

unread,
Jul 23, 2011, 1:55:24 AM7/23/11
to vu...@googlegroups.com
Assalam-u-Alaikum
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);
}
 
My Today's CS201 Paper 22-07-2011.pdf

^*^Aniqa Malik^*^

unread,
Jul 23, 2011, 4:03:14 AM7/23/11
to vu...@googlegroups.com
Thanks for your contribution. 

--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.
--
You received this message because you are subscribed to the Google
Groups "vuZs" group.
--
To post a new message on this group, send email to vu...@googlegroups.com
--
Message Posting Rules: http://vuzs.net/faq/4795-vuzs-google-groups-basic-rules-for-posting-messages.html
--
To unsubscribe from this group, send email to vuZs+uns...@googlegroups.com
--
To join this group Send blank email from your virtual university email address to
vuZs+su...@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe
---
For more information Contact vuZs Manager at in...@vuzs.net



--



Regards
Aniqa Malik
MBA HRM

                


سیٌد عمر شاہ

unread,
Jul 24, 2011, 7:41:05 AM7/24/11
to vu...@googlegroups.com
U welcum

I Hate Spammers

 Don't Make Me Angry

Reply all
Reply to author
Forward
0 new messages