Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position


Join the forum, it's quick and easy

Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position
Virtual Position Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

CS201 Final Term Paper

View previous topic View next topic Go down

GMT + 3 Hours CS201 Final Term Paper

Post by Maryam Mirza Sun Sep 25, 2011 10:47 am

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 VU solutions 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]

Code:
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]
Code:
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);
}
Maryam Mirza
Maryam Mirza
Monstars
Monstars

Libra Goat
Posts : 981
Join date : 2011-06-18
Age : 33

Character sheet
Experience:
CS201 Final Term Paper Left_bar_bleue500/500CS201 Final Term Paper Empty_bar_bleue  (500/500)

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum