php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cs201 Introduction to Programming final term solve paper January 2012
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#2
FINALTERM EXAMINATION

Spring 2010

CS201- Introduction to Programming

Marks: 58

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

In if structure the block of statements is executed only,

► When the condition is false

► When it contain arithmetic operators

► When it contain logical operators

► When the condition is true



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

Header file: fstream.h includes the definition of the stream classes __________.

► ifstream, fstream, cout

► ifstream, fstream, ofstream

► fstream, cin, cout

► None of the above

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

To access the data members of structure _______ is used.

► dot operator (.)

► * operator

► operatorà

► None of given.

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

eof( ), bad( ), good( ), clear( ) all are manipulators.

► True

► False

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

Which kind of functions can access private member variables of a class?

► Friend functions of the class

► Private member functions of the class

► Public member functions of the class

► Friend, private and public functions

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

The return type of operator function must always be void.

► True

► False

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

Friend function of a class is ______________ .

► Member function

► Non-member function

► Private function

► Public function

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

Function implementation of friend function must be defined outside the class.

► True

► False (any where in the class)

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

The normal source of cin object is,

► File

► Disk

► Keyboard

► RAM

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

Which of the following is correct way to initialize a variable x of int type with value 10?

► int x ; x = 10;

► int x = 10;

► int x, x = 10;

► x = 10; ADEEL ABBAs

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

Consider the following code segment. What will be the output of the following program?

int func(int) ;

int num = 10 ;

int main(){

int num ;

num = 5 ;

cout num ;

cout func(num) ;

}

int func(int x){

return num ;

}

► 5, 5

► 10, 5

► 5, 10

► 10, 10

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

With template function, the compiler automatically detects the passed data and generates a new copy of function using passed data.

► True

► False

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

What will be the correct syntax to declare two-dimensional array of float data type?

► float arr{2}{2} ;

► float arr[2][2] ;

► float arr[2,2] ;

► float[2][2] arr ;

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

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 class

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

Heap is constantly changing in size.

► True

► False

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

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.

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

Classes defined inside other classes are called ________ classes

► looped

► nested

► overloaded

► none of the given options.

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

If we define an identifier with the statement #define PI 3.1415926 then during the execution of the program the value of PI __________

► can not be replace

► None of the given options

► Remain constant.

► can be changed by some operation



Question No: 19 ( 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 correctl

► Destructors do not return a value.

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

Every class contains _______________.

► Constructor

► Destructor

► Both a constructor and a destructor

► None of the given options

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

A template function must have

► One or more than one arguments

► Only one argument

► Zero argument

► None of the given options

ADEEL ABBAs

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

Structured Query Language is used for ______________

► Databases Management

► Networks

► Writing Operating System

► none of the given options

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

When a call to a user-defined function finishes, the variable defined inside the function is still in existence.

► True

► False

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

The precedence of an operator can be changed through operator overloading.

► True

► False

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

A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this , _______________

► Write a separate class to handle each

► Use templates

► Use strings to store all types

► None of the given options

A Matrix can be composed of ints, floats or doubles as their elements. Instead of handling these data types separately, we can write Matrix class as a template class and write code once for all native data types.

Write Matrix class as a template class and write code once for all native data types

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

"delete" operator is used to return memory to free store, which is allocated by the "new" operator.

► True

► False

Question No: 27 ( Marks: 2 )

What is the difference between switch statement and if statement.

Question No: 28 ( Marks: 2 )

How can we initialize data members of contained object at construction time?

Question No: 29 ( Marks: 2 )

How the data members of a class are initialized with meaningful values?

Question No: 30 ( Marks: 2 )

Can we overload new and delete operators?

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;

}

2)

void func2(){

static int x = 0 ;

x++;

cout x endl ;

}

Question No: 32 ( Marks: 3 )

What is the keyword ‘this’ and what are the uses of ‘this’ pointer?

Question No: 33 ( Marks: 3 )

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

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

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

Question No: 34 ( Marks: 5 )

Write the general syntax of a class that has one function as a friend of a class along with definition of friend function.

Question No: 35 ( Marks: 5 )

Write down the disadvantages of the templates.



Question No: 36 ( Marks: 5 )

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



0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
cs201 Introduction to Programming final term solve paper January 2012 - by Vuhelper - 01-15-2012, 05:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  VU Mid Term and Final Term Solved Papers: How to Use Past Papers Without Relying on T admin 0 20 11-03-2026, 05:24 PM
Last Post: admin
  MCM301 MIDTERM solve paper 2011 Vuhelper 4 24,830 03-07-2015, 04:34 PM
Last Post: Xpert
  mgt602 midterm paper 3000 mcq's Xpert 5 11,420 05-30-2013, 02:16 PM
Last Post: Vuhelper
  All Solved Past Papers Mid & Final Term 2008 And 2009 viki 19 16,110 06-09-2012, 05:38 PM
Last Post: gr8touchstone@hotmail.com
  MID TERM PAST PAPER CS401 - Computer Architecture and Assembly SOLVE AND UNSOLVED usmanali126 2 6,438 04-13-2012, 03:27 PM
Last Post: Xpert
  Solved Paper MGT101 Fall 2009 Final Term viki 12 55,772 02-07-2012, 10:52 PM
Last Post: Xpert
  CS304 final term current paper spring Jily 2011 Vuhelper 1 3,565 02-04-2012, 10:34 PM
Last Post: roshi786
  Solved Paper of Final Term 2009 MTH101 Calculus And Analytical Geometry viki 8 12,082 02-04-2012, 12:47 AM
Last Post: Xpert
  CS101 Introduction to Computing FINAL TERM PAPERS SOLVED MCQS January 2012 Vuhelper 2 7,130 02-04-2012, 12:46 AM
Last Post: Xpert
  eng 201 final term paper Business and Technical English Writing January 2012 Vuhelper 3 7,321 01-30-2012, 06:52 PM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support