FINALTERM EXAMINATION
Fall 2009 - CS201
Introduction to Programming
Time: 120 min
Cs201 Final term Past Papers
Question No: 1
In C/C++ if we define an array of size eight (8) i.e. int Arr [8]; then the last element of this array will be stored at,
► Arr[0]
► Arr[8]
► Arr[7]
► Arr[-1]
Cs201 Final term Past Papers
Question No: 2
When an array is passed to a function then default way of passing this array is,
► By data
► By reference
► By value
► By data type
Cs201 Final term Past Papers
Question No: 3
Array is a data structure which store
► Memory addresses
► Variables
► Data Type
► Data
Cs201 Final term Past Papers
Question No: 4
We can also create an array of user define data type.
► True
► False
Cs201 Final term Past Papers
Question No: 5
When we define an array of objects then,
► Destructor will call once for whole array
► Destructor will call for each object of the array
► Destructor will never call
► Depends on the size of array
Cs201 Final term Past Papers
Question No: 6
What is the sequence of event(s) when allocating memory using new operator?
► Only block of memory is allocated for objects
► Only constructor is called for objects
► Memory is allocated first before calling constructor
► Constructor is called first beforeallocating memory
Cs201 Final term Past Papers
Question No: 7
We can delete an array of objects without specifying [] brackets if a class is not doing dynamic memory allocation internally.
► True
► False
Cs201 Final term Past Papers
Question No: 8
The second parameter of operator functions for are objects of the class for which we are overloading these operators.
► True
► False
Cs201 Final term Past Papers
Question No: 9
Which of the following is correct way to initialize a variable x of int type withvalue 10?
► int x ; x = 10 ;
► int x = 10 ;
► int x, x = 10;
► x = 10 ;
Cs201 Final term Past Papers
Question No: 10
Default mechanism of function calling in case of array is _____ and in case of variable is ___.
► Call by value, call by reference
► Call by referene, call by reference
► Call by reference, call by value
► Call by value, call by value
Post a Comment