CS201 Final Term Paper
Page 1 of 1 • Share
CS201 Final Term Paper
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]
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];
}
}
- 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- Monstars
-
Posts : 981
Join date : 2011-06-18
Age : 33
Character sheet
Experience:
(500/500)
Similar topics
» CS201 Final Term Paper
» CS201 - Introduction to Programming Final Term
» Mgmt630 Final Term VU Paper
» ECO401 Final Term Paper
» Mgt301 Final Term Paper
» CS201 - Introduction to Programming Final Term
» Mgmt630 Final Term VU Paper
» ECO401 Final Term Paper
» Mgt301 Final Term Paper
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Yesterday at 12:21 pm by ali001
» Hemangiom'App
Tue Nov 05, 2024 11:25 am by ali001
» MindfulMe - Mental Health App
Mon Nov 04, 2024 10:50 am by ali001
» Learn Candlestick Patterns
Tue Oct 15, 2024 5:51 am by ali001
» Woh Pagal Si Episode 52 to 62 - Top Pakistani Drama
Sat Sep 21, 2024 6:26 pm by Mir Emmad Ali Khan Domki
» Nearu - share your socials
Sat Sep 21, 2024 1:12 pm by ali001
» Nightclub Tycoon: Idle Empire
Thu Sep 19, 2024 9:16 pm by ali001
» Carnivore - Meat Diet Recipes
Wed Sep 18, 2024 2:37 pm by ali001
» Eid Milad un Nabi Mubarak 2024 (Rabiʻ I 14, 1446 AH)
Tue Sep 17, 2024 3:44 pm by Mir Emmad Ali Khan Domki