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.

Please share your all cs201 current Final Term paper here (Starting From 1 march 2014 to 12 march 2014)

Please share your all cs201 current Final Term paper here for the help of other students

+ 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: 1752

.

+ 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

Some of Questions From Today Paper (March 01,2014)

Which of the following is NOT a preprocessor directive?

  #error

 #define

 #line

► #ndefine

 

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

 float

► int (Not sure)

 char

 none of the given options

 

Friend function of a class is ______________ .

 Member function

► Non-member function

 Private function

 Public function

 

The normal source of cin object is,

 File

 Disk

► Keyboard

 RAM

 

The first parameter of operator function for operator,

 Must be passed by value

► Must be passed by reference

 Can be passed by value or reference

 Must be object of clas

 

While calling function, the arguments are assigned to the parameters from _____________.

► left to right.

 right to left

 no specific order is followed

 none of the given options

 

Pointer is a variable which store,

 Data

► Memory Address

 Data Type

 Values

 

All preprocessor directives are started with the symbol______.

 *

 +

 @

► #

 

Within the statement obj1=obj2; obj1 will call the assignment operator function and obj2 will be passed as an argument to function.

 

 True

 False\

 

 

What is the sequence of event(s) when deallocating memory using delete operator?

 Only block of memory is deallocated for objects

 Only destructor is called for objects

 Memory is deallocated first before calling destructor

► Destructor is called first before deallocating memory

 

 

Unary operator implemented as member function takes ____ arguments whereas non-member function

takes _____ arguments.

 One, zero

► Zero, one

 One, two

 Two, one

 

The first parameter of overloaded stream insertion operator is _________ where second parameter is

_______

 input stream, object of class

 object of class, output stream

 output stream, object of class

 object of class, input stream

 

While calling function, the arguments are assigned to the parameters from _____________.

► left to right.

 right to left

 no specific order is followed

 none of the given options

 

The return type of the operator function for operator is __________.

► class for which we overload operator

 reference of ostream class (ostream&)

 reference of istream class (istream&)

 void

 

The statement cin.get (); is used to,

 Read a string from keyboard

► Read a character from keyboard

 Read a string from file

 Read a character from file

 

 

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 (

 

For cin, the source is normally a ________ and destination can be ______.

 File, native data type

 Disk, user-define type

► Keyboard, variable

 

 

Subjective

 

 

 

Read the given below code and explain what task is being performed by this function.

 5 MARKS

Matrix :: Matrix ( int row , int col )

{

numRows = row ;

numCols = col ;

elements = new ( double * ) [ numRows ] ;

for ( int i = 0 ; i < numRows ; i ++ )

{

elements [ i ] = new double [ numCols ] ;

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

elements [ i ] [ j ] = 0.0 ;

}

}

Hint : This function belong to a matrix class, having

Number of Rows = numRows

Number of Columns = numCols

Which one (copy constructor or assignment operator) will be

called in each of the following code segment?

 

Answer:-

In this code the matrix function is defined, it get the number of rows from the user and create the row of matrix and then get the columns from the user and create the columns. The New is showing for creating

more array space for the data which user enters.

 

Q.  Is it possible to define two functions as given below? Justify your answer. 3 marks

func(int x, int y)

func(int &x, int &y)

 

 

Q.   Suppose an object of class A is declared as data member of class B. 3marks

(i) The constructor of which class will be called first?

(ii) The destructor of which class will be called first?

                                               

BEST OF LUCK & GOD BLESS YOU

Today CS201 Paper

Total Questions = 52 
Total Marks = 80
Total 1 Mark MCQ = 40
Total 2 Marks Short Questions = 4
Total 3 Marks Short Questions = 4
Total 5 Marks Long Questions = 4

CS201-Introduction to Programming.. Todays Paper(01/03/2014)..

 

1) Write a simplest program using getline functions of an object to read a sentence from the keyboard and then print it on the screen. (2)

2)In how many ways a many a unary operator can be overloaded for a class. write down the decription of each way.(2)

3)What are advantages and disadvantages of using macros over functions.(2)

4)Write down the piece of code that will declare a matrix of 3*3 and initialize all its elements with 0. (2)

5)Write the c++ code for declaration of overloaded stream exertion >> and stream insertion operator for the object d of type date.(3)

6) Friendship in classes or functions is granted or taken. How it is granted or taken.(3)

7)Which array operator is used to determine the size of a data type or a variable in the memory (3)

8)How name mangling technique is used by compiler and for what purpose it is used.? (5)

9) Write a program that defines a Tempelate function named Square() which finds the square of a number and then return it. Define one veriable of type float in main function and then call square function on that. Program output should look like this. (5)

" Enter a float value to find its square: 12.3 "

" Square of float numbers is: 151.29 "

10) Given is the code for class myClass (5)

{

                private:

                int x,y;

                public:

                myclass()

                {

                x=0;

                y-0;

                }

};

 

You are requierd to performfollowing task in the main() function.

  • Prompt the user to enter the number of objects to be created.
  • Dynamicaly allocate memory to objects according to the size entered by the user.
  • Deallocates memory that was allocated to objects.

 

11) code of date class (5)

class Date

{

                private:

                int day, month year;

                public:

                Date()

{

                day=01;

                month=01;

                year=2000;

}

void display()

{

                coutdaymonthyear;

}

};

write the code for dynamicaly creating the array of 10 objects of type Date (using default contructer) and then using loop , call the diplay() function for each of the using loop, call the display() function for each of the objects , In the end , deallocates the memory allocated in objects..... (5)

Remember me in your prayers.. 

Please share mcq and subjective file for the papers from which mcqs and questions are coming.

I am also done with my paper.

50% mcqs came from Moaaz file. Most of the Mcqs came from variable and operators section.

Short and long questions were different.

1 question of code snippet had to write the output.

1 question of to find the mistakes in code.

1 question of template code.

1 question of matrix.

1 question of Parameterized constructor.

Rest of the questions were of different coding. we had to write the code.

You can download past papers from here. 

http://vustudents.ning.com/group/cs201introductiontoprogramming/for...

Hope this helps.

Regards,

Juste

Ellis  thanks for sharing..best of luck 

Attention Students: You don’t need to go any other site for current papers pattern & questions. Because all sharing data related to current Final term papers of our members are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links. Just keep visiting http://vustudents.ning.com/ for all latest updates.

slam to all today was my paper      cs201

8 mcqs from moaz file

6 mcqs from midterm i.e lec 1-20

remaining were new most of them were about MEMBER FUNCTION,NON MEMBR FUNCTION,OVERLODING

but all were easy plz try to read all lecturs only once if u want to get good marks because hr lec mn se ay thy mcqs

+///Sooper Man///+  thanks for sharing 

sbjectv was easy but jst 2 marks and 3 marks wala......

5 marks waly 4ron programs likhny thy mjy un mn se aik b nai ata tha

Wht is use f reference data typ...2mrks

if objct of class A is declared in class B then constrctr f which class will be called first and destrctr f which class will be called first...2marks from MOAZ FILE

Read the given below code and explain what task is being performed by this function 5 MARKS
Matrix :: Matrix ( int row , int col )
{
numRows = row ;
numCols = col ;
elements = new ( double * ) [ numRows ] ;
for ( int i = 0 ; i < numRows ; i ++ )
{
elements [ i ] = new double [ numCols ] ;
for ( int j = 0 ; j < numCols ; j ++ )
elements [ i ] [ j ] = 0.0 ;
}
} ye b aya tha MOAZ FILE ...3mrks

what happend if calloc returns NULL...2 mrks ans on page 282

what is casting why we cast the void pointr ....3 mrks ans on page 281

RSS

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

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

.