MGT-301 Final Term Exams Preparation Virtual University With Answers

image
image
image

MGT-301 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 For which array, the size of the array should be one more than the number of elements in an array? int double float char
2 Skill(s) that is/are needed by programmer’s _______________________. Paying attention to detail Think about the reusability Think about user interface All of the given options
3 What does STL stand for? Source template library Standard template library Stream template library Standard temporary library
4 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
5 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 before allocating memory
6 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
7 Array is a data structure which store Memory addresses Variables Data Type Data
8 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
9 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]
10 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
11 "setprecision" manipulator will set. The number of digits after the decimal point. The number of digits before the decimal point The number of digits in a number None of the given options
12 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
13 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
14 A pointer variable can be, Decremented Incremented Multiplied Both Iecremented and Decremented
15 When an object of a class is defined inside an other class then Constructor of enclosing class will be called first Constructor of inner object will be called first Constructor and Destructor will be called simultaneously None of the given options
16 When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are. Zero One Two N arguments
17 Which of the following function call is correct for the function prototype? defaultParameters ( int a, int b = 7, char z = ‘*’ ); defaultParameters (5); defaultParameters (5, ‘8’); defaultParameters (6, ‘#’); defaultParameters (0, 0, ‘*’, 0);
18 The operator used for casting, in C, is standard ________ operator. none of the given options cast cost const
19 The endl and flush are _______ Functions Operators Manipulators Objects
20 The operator function overloaded for an Assignment operator (=) must be. Non-member function of class Member function of class Friend function of class None of the given options
Download This Set