We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

All Current Final Term Papers Spring 2013

From 20 Jul , 2013 to 31 Jul 2013 Spring 2013

 

PLZ Share Ur Papers Files Also where u Study

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1482

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

CS201_Current_Final_term_Paper_Spring_2013_21_07_2013_10AM_

Attachments:

mera aaj cs201 ka paper tha.

about 50% mcqs from past papers and remaining new mcqs...
long questions....
Q.....Date class was given,,,,i needed to display its objects.
Q.....Template class mn int and double k liye conversion bnani ti
Q.....THIS pointer ka question tha.
Q.....aik switch statment ka question tha,,,v simple and easy.
Q.....manipulator ka ik question tha......**** k liye manipulator bnana tha and then Virtual****University display krna tha...
Q....new and delete operators pe likhna tha kuch.
bas or bhi the paryad ni hain....
plz remember in prayers

Paper 21,July 2013—CS201

Question No: 1 ( Marks: 1 ) - Please choose one

In flow chart, the symbol use for data flow……..,

Rectangle

Circle

Arrow

Diamond

 

Question No: 2 ( Marks: 1 ) - Please choose one

x *= y+z

            ►x = x * (y+z)

            ►x = x*y+z

 

Question No: 3 ( Marks: 1 ) - Please choose one

Which looping process is best, when the number of iterations is known?

 for

 while

 do-while

all looping processes require that the iterations be known

Question No: 4 ( Marks: 1 ) - Please choose one

Declaration of short int with name of sum.

 

►int short sum;

►short int sum;

 

Question No:  7 ( Marks: 1 ) – Please choose one

The stream objects cin and cout are included in which header file?

► iostream.h (Page 15)

 fstream.h

 istream.h

 ostream.h

 

 

 

 

 

 

Question No:  8 ( Marks: 1 ) – Please choose one

Dereferencing operator is represented by _______

*
+

None of the given

 

Question No:  9 ( Marks: 1 ) – Please choose one

If a class A declares itself a friend of class B and a class B declares itself a friend of class C then __________.

Class A is also a friend of class C.

►Class B is also a friend of class A.

Class A is also a friend of class C if A declares C as its friend

Class A is also a friend of class C if C declares A as its friend.

 

 

Question No: 11 ( Marks: 1 ) - Please choose one

In functions that return reference, use __________variables.

 Local

 Global

► Global or static (Page 369)

 None of the given option

 

Question No: 12 ( Marks: 1 ) - Please choose one

Class is a user defined___________.

► data type (Page 317)

► memory referee

► value

► none of the given options.

 

Question No: 13 ( Marks: 1 ) - Please choose one

Function seekg() takes ____________ parameter(s).

0

► 1

 2

 3

 

Question No: 15 ( Marks: 1 ) - Please choose one

The operator used for casting, in C, is standard ________ operator.

 none of the given options.

► cast (Page 281)

 cost

 const

 

 

Question No: 17 ( Marks: 1 ) - Please choose one

The first parameter of operator function for operator,

 Must be passed by value

► Must be passed by reference (Page 446)

 Can be passed by value or reference

 Must be object of class

 

 

 

Question No: 18 ( Marks: 1 ) - Please choose one

The second parameter of operator function for >> operator,

 Must be passed by value (Page 446)

► Must be passed by reference (Page 446)

 Can be passed by value or reference

 Must be object of class

 

Question No: 19 ( Marks: 1 ) - Please choose one

A Pointer is a special variable that contain

► Data values

► Memory Address (Page 267)

► Both data and values

► None of the given option

Question No: 20 ( Marks: 1 ) - Please choose one

Operator overloading can be performed through__________________.

 Classes

► Function (Page 371)

 Operators

 Reference

 

Question No: 21 ( Marks: 1 ) - Please choose one

Which of the following is true about operator overloading?

►The operator works with only objects of the class in which it is overloaded.

The operator works with objects and primitive data types regardless of parameters.

The operator works with both objects and primitive data types depending on parameters.

The operator must have a constant and an object as parameters.

 

Question No: 22 ( Marks: 1 ) - Please choose one

The operator function overloaded for an Assignment operator (=) must be

 Non-member function of class

► Member function of class (Page 372)

 Friend function of class

 None of the given options

Question No: 23 ( Marks: 1 ) - Please choose one

With template function, the compiler automatically detects the ___________ and generates ______________ using passed data

►passed data , a new copy of function

parameters, an old copy of function

old copy of function, parameters

parameters, an new copy of function

Question No: 24 ( Marks: 1 ) - Please choose one

What does STL stand for?

 Source template library

► Standard template library (Page 519)

 Stream template library

 Standard temporary library

 

 

 

 

Question No: 25 ( Marks: 1 ) - Please choose one

Templates provide way of abstracting ______________ information.

►Type

Data

Method

Access

Question No: 26 ( Marks: 1 ) - Please choose one

The code is written to __________ the program.

► implement (Page 520)

 design

 analysis

 none of the given options.

 

 

 

 

Question No: 27 ( Marks: 1 ) - Please choose one

The appropriate data type to store the number of rows and colums of the matrix is____________.

 float

► int  

 char

 none of the given options.

Question No: 28 ( Marks: 1 ) - Please choose one

ANSI

            ► American Neutral Standards Institute

Asian National Standards Institute

►American National Standard Institute

Australian National Standards Institute

 

Question No: 29 ( Marks: 1 ) - Please choose one

Which of the following option will be true, if we overload "-=" operator?

 only - operator needs to be overloaded

 Minus (-) and = operators need to be overloaded

► the -= operator need to be overloaded explicitly

 the - and = operators need to be overloaded implicitly

 

Question No: 30 ( Marks: 1 ) - Please choose one

Classes defined inside other classes are called ________ classes

 looped

► nested (Page 492)

 overloaded

 none of the given options.

 

Question No: 31 ( Marks: 1 ) - Please choose one

When an object calls a member function, the function implicitly gets a this ______.

►Operator

Function

Pointer

Object

Question No: 32 ( Marks: 1 ) - Please choose one

When an object of a class is defined inside an other class then,

► Constructor of enclosing class will be called first (Page 496)

► Constructor of inner object will be called first

 Constructor and Destructor will be called simultaneously

 None of the given options

Question No: 34 ( Marks: 1 ) - Please choose one

Which of the following is NOT a preprocessor directive?

 #error

 #define

 #line

► #ndefine (Page 272)

 

Question No: 35 ( Marks: 1 ) - Please choose one

            Which of the following is NOT a common error that can happen with memory a  llocation?

Memory leak

Unreferenced memory

►Void pointers

Dangling pointers

 

Question No: 36 ( Marks: 1 ) - Please choose one

Which of the following function is used to increase the size of already allocated memory chunk?

 malloc

 calloc

► realloc (Page 285)

 free

 

 

Question No: 37 ( Marks: 1 ) - Please choose one

NULL value has been defined in ______ and _________ header files.

 

 strings.h and iostream.h

 ctype.h and conio.c

 conio.c and conio.h

► stdlib.h and stddef.h (Page 281)

 

Question No: 38 ( Marks: 1 ) - Please choose one

Which value is returned by the destructor of a class?

 A pointer to the class.

 An object of the class.

 A status code determining whether the class was destructed correctly

► Destructors do not return a value. (page 323)

 

Question No: 39 ( Marks: 1 ) - Please choose one

Which one is the correct syntax for defining an identifier PI with preprocessor directive?

 #define PI 3.1415926;

 #define PI 3.1415926

 #define PI = 3.1415926 ;

 #define PI = 3.1415926



Read more: Please Share your Current Final Paper of CS201 Introduction to Prog... http://vustudents.ning.com/group/cs201introductiontoprogramming/for...

Attachments:

My Today CS201 FINAL PAPER (22-7-2013)

Total Questions: 52

40 MCQ’S : 40 Marks                        4 Questions: 2 Marks

4 Questions: 3 Marks                          4 Questions: 5 Marks

(5-7)MCQ’s are from Moaz objective file

 Some MCQ’S are:

 

  • Result of mathematical operation 6+27/3*3 is:

 45               9                 33                30

 

  • Result of the expression z=x%y if x=19 and y=4?

2                 3                 4                 5

  • A precise sequence of steps to solve a problem is:

Program                Utility          Routine                 Statement

 

  • The member function of the class occupy ______ region in memory for ________ objects of class.

Separate, each                 Common, all                   Different, each                 Different, all

 

  • Automatic variable are created on __________

Heap           Free store              Static storage                  Stack

 

  • Templates provide way of abstracting ____ information.

Type                     Data            Method                 Access

 

  • The code is written to _______ a program.

Implement             Design                   Analysis                Test

 

  • ANSI stands for____________
  • STL stands for _______________

 

  • At the time of linking, library functions are available in the__________ form.

Compiled              Text             Run able                Code

 

  • Assignment operator is __________ associated.

Left             Right           Binary                   Unary

 

 

 

 

 

 

Subjective:

 

2 MARKS:

 

  • What is return by new operator?

 

  • What is the equivalent C expression for following algebraic expression?

ax3ay2 + bax2y + abcx

 

  • Write down piece of code that will declare a matrix of 3x3. And initialize all its locations with 0;

Answer:-

int matrix [3] [3] ;

matrix [0] [0] = 0;

matrix [0] [1] = 0;

matrix [0] [2] = 0;

matrix [1] [0] = 0;

matrix [1] [2] = 0;

matrix [1] [2] = 0;

matrix [2] [0] = 0;

matrix [2] [1] = 0;

matrix [2] [2] = 0;

Another answer:-

we can also do it as given below

int matrix [3][3] = { 0 }; //all elements 0

 

  • How can we initialize an object which is declared as constant data member in another class?

 

3 MARKS:

 

  • Write the output of the given code:

 

#include<iostream.h>

Main()

{

          int num [3][2]={12,51,34,54,12,55}

for (int j=0; j<3; j++)

cout*(*(num+j)+1)endl;

return 0;

}

 

  • Write simple program that use getline() of cin obj for reading string of 30 char from keyboard when press enter to output;
  • Describe each in one line:

 

Matrix (int =0, int=0);

Matrix (const Matrix&);

≈Matrix();

 

  • Given is the code for nested classes:

Class First

{

Public:

class Second

{

Public:

          Second()

{

          fValue=20;

}

Void Display();

Private:

          Int fValue;

};

};

 

Write these code to define Display() member function of class outside the body of outer class. The function Display() will display the value of data member fValue of class First.

 

 

5MARKS:

 

  • Suppose you want to develop a payroll system of a company having permanent, contract and hourly based employees. Which type of activities would you follow to program this system efficiently?

 

  • Write the main function in which you have to add three integer elements in template class queue, and then call print function. After that, remove two elements from the queue.

 

Iss ke baad ik lengthy program or code likha hoa tha due to shortage of time I can’t wrote it.

 

  • Template class queue

Class Weight()

{

Private:

          int Kilograms, grams;

Public:

Weight()

{

          Kilograms=0;

          Grams=0;

}

Weight (int k, int g)

{

          Kilograms=k;

Grams=g;

}

};

 

You are required to write the > operator overloading function for comparing the objects of type weight such that if first weight object is greater than second, the function must return true otherwise it should return false.

 

  • Write a program which defines three variables of type double which store three different values including decimal points, using set precision manipulators to print all these values with different numbers of digits after the decimal number.(5)

 

Answer:-

#include

#include

int main ()

{

double x1 = 12345624.72345

double x2 = 987654.12345

double x3 = 1985.23456

cout setprecision (3) x1 endl;

cout setprecision (4) x2 endl;

cout setprecision (5) x3 endl;

return 0;

}

 

CS201 final term paper

1- Write statement for constant pointer to integer and also pointer to constant integer.
2- Get input from user for 2 by 4 matrix and display it.
3- For given code of class rectangle, write code for copying constructor.
4- How will you identify if a declared variable if reference of address variable.
Some other questions were,
For given code having new operator, write delete.
For given code for converting Celsius to Fahrenheit, write equivalent template.

Q1: What are two types of conversion for user-define datatype?
Q2: What will be the output of temple if pass value 5 of integer type
template < class T>
T reciprocal (T x ) {
return 1 / x; 
}
Q2: If a structure is passed to function what will default calling conversion (by value or by reference)
Q3: Write program to print floatg point 1.234 in a 9 digit with precidiog zero
Q4: What is out put of the program
Char name[10] = “Asad”;
Char msg[10] = “Yaqoob”;
strncat(msg,name,3);

Q5 : write simple program that use getline() of cin obj for reading string of 30 char from keyboard when press enter to output;
Q7 : output of the program
int n = -77;
cou.width(6);
cout right n endl;
cout.width(6);
cout left n endl;

Q6 : use templeate function square and find the number then return define variable type double in main function…
Q8: conweight into pound forumul give using function solve quesioin
Q9: write program that declar 5 int and display the output following
xxxxxx1000
etc
Q10: question from operator overloading date ke overloading krne the…
mcqs
in _______ first pointer store the address of the some other pointer which contain the address of any variable
when call to fuction statement is encountered ____________
to avoid dangling pointer always return ________________

Q1: What are two types of conversion for user-define datatype?
Q2: What will be the output of temple if pass value 5 of integer type
template < class T>
T reciprocal (T x ) {
return 1 / x; 
}
Q2: If a structure is passed to function what will default calling conversion (by value or by reference)
Q3: Write program to print floatg point 1.234 in a 9 digit with precidiog zero
Q4: What is out put of the program
Char name[10] = “Asad”;
Char msg[10] = “Yaqoob”;
strncat(msg,name,3);

Q5 : write simple program that use getline() of cin obj for reading string of 30 char from keyboard when press enter to output;
Q7 : output of the program
int n = -77;
cou.width(6);
cout right n endl;
cout.width(6);
cout left n endl;

Q6 : use templeate function square and find the number then return define variable type double in main function…
Q8: conweight into pound forumul give using function solve quesioin
Q9: write program that declar 5 int and display the output following
xxxxxx1000
etc
Q10: question from operator overloading date ke overloading krne the…
mcqs
in _______ first pointer store the address of the some other pointer which contain the address of any variable
when call to fuction statement is encountered ____________
to avoid dangling pointer always return ________________

RSS

Latest Activity

+ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion 100 Instructions from the Quran
4 minutes ago
UMER UMER posted photos
6 minutes ago
ALEENA replied to +!!!StRaNGeR!!! +'s discussion مار ڈالے گی ہوک ، شہزادی
18 minutes ago
ALEENA liked +!!!StRaNGeR!!! +'s discussion مار ڈالے گی ہوک ، شہزادی
19 minutes ago
ALEENA replied to +!!!StRaNGeR!!! +'s discussion من جس کا مولا ہوتا ہے
22 minutes ago
ALEENA liked +!!!StRaNGeR!!! +'s discussion من جس کا مولا ہوتا ہے
22 minutes ago
ϝ ι ყ α liked ϝ ι ყ α's discussion ** 22 Tricks You Must Master To Become A Keyboard Ninjaa....**
31 minutes ago
ϝ ι ყ α replied to ϝ ι ყ α's discussion ** 22 Tricks You Must Master To Become A Keyboard Ninjaa....**
32 minutes ago
ϝ ι ყ α liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion 100 Instructions from the Quran
35 minutes ago
Munyam updated their profile
36 minutes ago
Ikra butt added a discussion to the group MGT211 Introduction To Business
37 minutes ago
Anarkali updated their profile
40 minutes ago
+"Alan Walker"++ liked + !! "AS" !!'s discussion Alfaaz Ki Nisbat..
50 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked +¢αяєℓєѕѕ gιяℓ's blog post خوش نصیب
58 minutes ago
Ayesha Khan replied to + M.Tariq Malik's discussion EDU431 Test Development & Evaluation Assignment No 01 Fall 2019 Solution & Discussion in the group EDU431 Test Development & Evaluation
58 minutes ago
Ayesha Khan joined + M.Tariq Malik's group
58 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked MA Para's discussion ENG101 1st Assignment Solution Nov 2019
58 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked +!!!StRaNGeR!!! +'s discussion ﺁﭖ ﺩﻝ ﺟﻮﺋﯽ ﮐﯽ ﺯﺣﻤﺖ ﻧﮧ ﺍﭨﮭﺎﺋﯿﮟ ، ﺟﺎﺋﯿﮟ
58 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zohaib iftikhar's discussion ...* MARD AUR AURAT KA GUNAH ...*
58 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked +¢αяєℓєѕѕ gιяℓ's discussion Wo Naraz Ho Tabhe bhi....!
58 minutes ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service