Tuesday, July 17, 2012

CS201 Final Term MCQs July 2012 Current Paper


MCqs mostly past papers main se aye thay jin main se kuch yay hain

Friend function of a class is ______________.
Member function
Non-member function
Private function
Public function

A template function must have at least ---------- generic data type
Zero
One
Two
Three

The object _______________may be used both for file input and file output
fstream,
ifstream,
ofstream,
none of the given options

What should be the return type of the constructor?
void pointer
int
same as object type
constructors do not return any thing

Classes defined inside other classes are called ________ classes.
Looped
Nested
Overloaded
none of the given options.

new operator is used to allocate memory from the free store during
Compile Time
Run Time
Link Time
None of the given options

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

The normal source of cin object is
File
Disk
Keyboard
RAM

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.

 C is widely known as development language of _______ operating system.
Linux
Windows
Unix
Mac OS

Like member functions, ______ can also access the private data members of a class.
Non-member functions
Friend functions
Any function outside class
None of the given options
The stream insertion and stream extraction operators are already overloaded for ______.
User-defined data types
Built-in data types
User-defined and built-in data types
None of the given options

The appropriate data type to store the number of rows and colums of the matrix is____________.
Float
Int
Char
none of the given options.

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

cout setfill(‘0’) setw(7) 128 ;
0000128
0128128
1280000
0012800

Which of the following is the correct way to declare a variable x of integer type?
x int ;
integer x ;
int x;
x integer

Q.1: Using setw and setfill manipulators to display Virtual--------University.

Q.2: Write a program to display:

          If you age is less than or equal to 18 then display "you are child"

          if your age is above 18 or less than 35 then display "you are adult"

          if your age is is above 60 then display "you are senior citizen"

0 comments:

Followers

Copyright VirtualHelp 2011. Powered by Blogger.

Blog Archive

Search Your Subject