¤Virtual University Of Pakistan Network¤







Permalink Reply by Amel ... on July 16, 2012 at 12:25pm Question :
What is the out put of the given code?
Int a,b,c,c;
A =5;
B=4;
C=2;
D = (4*a+(2+b)+c)/2;
Cout”the answer is”d;
Question:
How can we initialize an object which is declared as constant data member is another class?
Question:
Write two types of conversion for user defines data types?
Question:
What is the source of destination of cin stream?
Question:
Determine whether dynamically memory allocation has been above successfully or not is C++ using the new operator.
Question:
Int main()
{
Intx=3;
Int&y=x;
Cout”x=”xend1”y=”yend1;
Y=x*3-y;
Cout’x’xend1’y=”yend1;
System(“pause”)
}
Question:
Task is being performed by this function
Matrix::matrix (int row, intcol)
{
Num rows = row;
Num cols =col;
Elements = new (double*)[new rows];
For(int i = 0; < num rows; i++)
{
Elements[i] =newdouble[numcols];
For(intj=0;j<numcols;j++)
Elements[i][j]=0.0;
}
}
Question:
Program which define two variables var1 and var2 of type int which store two different values and prints the value of these variable is there different system ( octal ,vertex, decimal) using the antipulates setbase().
Question:
Code for the user defined manipulates named settle x to display a number into its hexadecimal representation by using the showbase flag.

Permalink Reply by Yasmeen(S.admin) on July 16, 2012 at 12:52pm Q.1. Let we have a class,
class String
{
char buf [25];
};
Write code for assignment (=) operator function which assign one String object to other object. Your code should also avoid self assignment.
Q2. Write a program which uses setflag function of cout to display hexadecimal and octal representation of number.
Q3: Write a program that defines a Template function named Square () which finds the square of a number and then return it. Define one variable of type int in main function and then call Square function on that.
Program output should look like this:
Enter an integer value to find its Square: 6
Square of integer number is: 36
Q4: What is the output of following code snippet. (2)
// class templates
#include <iostream>
using namespace std;
template <class T>
class mypair {
T a, b;
public:
mypair (T first, T second)
{a=first; b=second;}
T getmax ();
};
template <class T>
T mypair<T>::getmax ()
{
T retval;
retval = a>b? a : b;
return retval;
}
int main () {
mypair <int> myobject (100, 75);
cout myobject.getmax();
system("pause");
}
Q5. Write output pf the given code (2)
a=10 b=5 c=0
a+(2*5)+c/2
Q6.Can we call new operator inside constructor function?
Q7. We comment our program liberally. How comment help us? Also tell is they affect the performance.
Q8. what is the source and destination of cin stream?
Q9 and Q10:
2 question thay jin mai code diya hua tha aur us ka output daina tha. template n string wala.questions
MCQ’s past papers

Permalink Reply by Yasmeen(S.admin) on July 16, 2012 at 12:52pm Write a program which defines five variables which store the salaries of five employees, using setw and setfill manipulators to display all these salaries in a column.
Note: Display all data with in a particular width and the empty space should be filled with character x
Output should be displayed as given below:
xxxxxx1000
xxxxxx1500
xxxxx20000
xxxxx30000
xxxxx60000
Answer:
#include
#include
main(){
int sal1 =1000;
int sal2 =1500;
int sal3 =20000;
int sal4 =30000;
int sal5 =60000;
cout setfill ('x') setw (10);
cout sal1/p>
cout setfill ('x') setw (10);
cout sal2/p>
cout setfill ('x') setw (10);
cout sal3/p>
cout setfill ('x') setw (10);
cout sal4/p>
cout setfill ('x') setw (10);
cout sal5/p>

Q.make a program using getline function(5)
Q.make a program using template function select two floating point number and add them with add() function.(5)
Q.make a program take salary and pay tax of 5% if salary is less than 10,000 and pay 7% if the salary is greater than 10,000 using switch function.(5)
Q.what are the function of new and delete ?(3)
Q.what are the stream insertion overloaded operators?(3)

Permalink Reply by Yasmeen(S.admin) on July 17, 2012 at 11:10am McQS mix new and old…40 marks Long,,
All are program and its code..
Find error in class,, templates..
And matrix programs Question No: 31 (Marks: 3 )
What will be the output of following functions if we call these functions three times? 1)
void func1(){
int x = 0;
x++;
cout x endl;
}
Answer:
1
1 1
2)
void func2(){
static int x = 0 ;
x++;
cout x endl ;
}
Answer:
1
2
3
5 marks question explain each statement….
Streamposorg=afite.tellp(); Afilte.sekp(0,ios::end);
Must see mid team paper also

Permalink Reply by Yasmeen(S.admin) on July 17, 2012 at 12:40pm by prince zorro
Assalam o alikum
Dear members
yahan p final paper pura to nahe bat sakta lekin idea day sakta hoon kay kiya kiya aya tha
Total marks 80
MCQ's 40
2x4 = 8
3x4 = 12
5x4 = 20
MCQ's + Questions
40 + 8 + 12 + 20 = 80
MCQ's main
Arrays say, Flow charting or baki aya tha
Questions main ziada yeh pucha gaya tha kay is code ko correct karo ya is code ki output batao or program write kay aik 2 he swal aye thay.
AP loog apna bhe paper share karain please
Ok Allah hafiz
Permalink Reply by Badshah on July 17, 2012 at 11:48pm My paper of cs201:
52 total questions, 40 MCQs, Remaining questions carrying 2, 3, and 5 marks.
Q1: (Marks 5) Write a program that defines a Template function named Add () which adds two numbers returns Sum. Define two variables of int type in the main and then call Add () function on that.
Output should be like this:
Adding numbers (don’t remember here what was written)
Enter first number:
12
Enter second number:
25
Sum=37
Q2: (Marks 5) Find the error in the program and then remove this. (Don’t remember the coding)
Q3: (Marks 5) Given the class Data
main()
{
class Date
{
private:
int day, month, year;
public:
day=01;
month=10;
year=2010
}
……………..Dont remember the lines
……………..
……………..
}
Use the dynamically allocation (don’t remember what)
In the last also free memory allocation.
Q4: (Marks 3) Why goto is not recommended to use in programmes?
Q5: (Marks 2) Write two types of data conversions used for used defined data types.
Q6: (Marks 2) Write the following using logical operators:
Q7: (Marks 3) Write the output of the following if “int 5” is passed to the variable:
Template <class T);
T reciprocal (T x);
{
return (1/x);
}
(it was like something. Don’t remember exactly)
Q8: (Marks 3): How can we determine that dynamically memory allocation has been set successfully or not is C++ using the new operator?

Permalink Reply by PRINCE ZORRO on July 19, 2012 at 2:14pm Please share your current papers

Permalink Reply by PRINCE ZORRO on July 19, 2012 at 2:15pm My Paper is based on 60 Questions
40 MCQs
2x4 = 8
3 x 4 = 12
5 x 4 =20
40 + 8 + 12 + 20 = 80 marks





Permalink Reply by SiLeNt MooN(Admin) on July 19, 2012 at 9:59pm mara paper b attach file my hy plz chek attach file


Permalink Reply by SiLeNt MooN(Admin) on July 19, 2012 at 11:02pm 
Permalink Reply by SiLeNt MooN(Admin) on July 19, 2012 at 11:04pm also in front of you
ap jis way sy easy samjo wahan sy understand kr lana
SiLeNt Moon(Lucky)
Cs201 Papers
Question no 1 (2 marks)
Identify each of the following as function call, function definition and function declaration
i) int func( int num1, int num2);
ii) int func(int, int);
iii) func(5,6);
iv) int func(int num1,int num2){}
Question no 2 (2 marks)
What will be the output of the following code snippet?
Intx=10;
Int&y=x;
Y+=5
Coutx;
Question no 3 (2 marks)
Write the C++ code for the declaration of overloaded stream insertion (>>) and stream extraction () operator for the object d of type Data
Question no 4 (2 marks)
Suppose that we have class students which contain an object of class string as its data member. Now if we create an object of student’s type then what will be the construction sequence of objects?
Question no 5 (3 marks)
Utility software’s have the key role in operating system’s functionality. Explain with example why this software’s are important?
Question no 6 (3 marks)
New and delete operators are used for which purpose?
Question no 7 (3 marks)
Write the code using set f() function to display an integer value 4000 in a 15-digits field by right justifying it?
Question no 8 (3 marks)
Given is the code a class named something;
Class something
{
Privet
Int I value;
Double value;
Chare value;
Public;
Void display()
{
CoutI value” ”c value;
}
Write the code for a default constructor to initialize each data member of the class using member’s initialization
Question no 10 (5 marks)
Describe the output from the following program
#include>iostream. h>
#include<conio. H>
Int main()
{
For( int 1=1;i<6;i++)
If(i%2==0)
Coutiend1;
Else
Couti+1end 1;
System(“pause”);
}
Question no 11 (5 marks)
What will be the output if the given code is executed
Int main()
{
Int x=3;
Int&y=x;
Cout”x=”cend 1 “y=”yend 1;
Y=x*3-y
Cout”x=”xend 1”y=”yend 1;
System(“pause”);
}
Question no 12 (5 marks)
Given is the code of data class
Class data
{
Private:
Int day;
Int month;
Int year;
Public:
Data()
{
Day=01;
Month01;
Year=2000;
}
};
Write the code for a class person which contains three data members Name, Address and DOB, where Name and Address are char pointer while DOB(Date Of Birth) is an object of type Data
This class should also contain a default constructor to initialize all its date members using some default values
=======================
Popular Social Events
=======================
+ Miss VU
+ Mr VU
---------------------------------------
௵ MR VU,S
௵ ADMINS
ʭ☀Administration☀ʭ
Senior Admin : Yasmeen
VUDESK Owner : Ismail Shah
© 2013 Created by ʭIsmail Shahʭ.
| Awards & Titles |
VUDESK is social networking website created for the students of Virtual University of Pakistan with an aim of providing educational support in terms of subject oriented material such as Assignment,GDB,Quizes Solutions and of course a light entertainment.
Video Profile
Our Community has also Live TV Transmission to facilitate the students for enhancing their skills as well as to take opportunity for doing something they love to do,Check Below Link To Know all about our upcoming transmission and Programs
Radio Asia Live [VUDESK Radio]
EziLive TV