VUDESK

¤Virtual University Of Pakistan Network¤



Welcome Visitors to VUDESK Family .Join VUDESK For Free to Get more Access to study material and lot of infotainment stuff. Stay Connected!!

VUDESk ALL Subject CODES
Find Your Subject Code , Join Group And You Will Get ALL related Data
ACC - Fundamentals of auditing and business
ACC311ACC501
ACF - (Accounting And Finance Related)
ACF619ACFI619
COM - (Commerce Related)
COM619COMI619
ECO - (Economics Related)
ECO401 ECO402 ECO403 ECO404
ENG - (English Related)
ENG001 ENG101 ENG201 ENG301 ENG401
ETH201 - Ethics (for Non-Muslims)
ETH201
ISL201 - Islamic Studies
ISL201
IT - (Info Tech Related
IT000IT0001IT430IT619ITI619
MIS - (Project And Internship Report)
MIS619 MISI619MIS620 MISI620
PAD - (Public Administration Related)
PAD619 PADI619
PAK301 - Pakistan Studies
PAK301PAK302
PHY - (Physics Related)
PHY101 PHY301
PSC201 - International Relations
PSC201PSC401
SOC - (Socialogy Related)
SOC101 SOC401
STA - (Statistics and Research)
STA301 STA630
URDU - (Urdu Related)
URD101

CS201 Introduction to Programming-Final Term Papers Spring 2012 -Date 16-July to 27-July

SHARE

Tags: -Date, 16-July, 2012, 27-July, CS201, Introduction, Papers, Programming-Final, Spring, Term, More…to

Views: 320

Replies to This Discussion

Advertise Here

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.

            

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

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)

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

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

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:

  1. number is both multiple of 4 and 6
  2. number is even but not 8
  3. answer is either N or n
  4. don’t remember this

 

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?

Please share your current papers

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

mara paper b attach file my hy plz chek attach file

Download Documents

screen shoots of my paper

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

 

RSS

*Member OF Week*

1. SiLeNt MooN(Admin)

SAHIWAL, Pakistan

=======================

Popular Social Events

=======================

+ Member of the Day

+ Member of the Week

+ Member of the Month

+ Member of the Year

+ Miss VU

+ Mr VU

+ Gold Members

+ Vote for Miss VU

+ Vote for Mr VU

+ Members Points Table

+ Profile Points Allocation

+ Competition Corner

+ Our Fans Club

+ Certificate Winners

---------------------------------------

௵ Scholars Of Desk

 Gold Members

 MR VU,S

௵ MISS VU,S

 Members Of Month

 Team Members

 Moderators 

  ADMINS

ʭAdministrationʭ

Senior Admin : Yasmeen

VUDESK Owner : Ismail Shah

DMCA.com

VUDESK GROUPS

© 2013   Created by ʭIsmail Shahʭ.

Badges  |  Report an Issue  |  Terms of Service

-->