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 Consider the following code segment. What will be the output of following code? Int addValue (int *a){ int b = (*a) + 2; return b ; } main () { int x =6 ; cout << x << “,” ; cout << addValue(&x) << “,” ; cout << x ; }. 6,8,6 6,6,8 6,8,8 6,6,6
2 Consider the following code segment. What will be the output of following code? Int addValue (int *a){ int b = (*a) + 2; return b ; } main () { int x =6 ; cout << x << “,” ; cout << addValue(&x) << “,” ; cout << x ; }. 6,8,6 6,6,8 6,8,8 6,6,6
3 What will be the value of ‘a’ and ‘b’ after executing the following statements?A = 3; b = a++; 3, 4 4, 4 3, 3 4, 3
4 C is widely known as development language of _______ operating system. Linux Windows Unix Mac OS
5 The stream objects cin and cout are included in which header file? iostream.h fstream.h istream.h ostream.h
6 Which of the following is NOT a preprocessor directive? #error #define #line #ndefine
7 Which of the following function is used to increase the size of already allocated memory chunk? malloc calloc realloc free
8 When a value is referred by a normal variable then it is known as, Direct Reference Indirect Reference Partial Reference Proper Reference
9 Operator overloading can be performed through__________________. Classes Function Operators Reference
10 Reference Value Type Data The code is written to __________ the program. implement design analysis none of the given options
11 A Pointer is a special variable that contain. Data values Memory Address Both data and values None of the given option
12 Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int? new int(10) new int[10] ; int new(10) ; int new[10];
13 How many bytes will the pointer intPtr of type int move in the following statement? intPtr += 3 ; 3 bytes 6 bytes 12 bytes 24 bytes
14 Class is a user defined___________. Data type Memory referee Value None of the given options
15 Which one of the following is the declaration of overloaded pre-increment operator implemented as member function? Class-name operator +() Class-name operator +(int) Class-name operator ++() ; Class-name operator ++(int) ;
16 Which of the following statement is best regarding declaration of friend function? Friend function must be declared after public keyword Friend function must be declared after private keyword Friend function must be declared at the top within class definition It can be declared anywhere in class as these are not affected by the public and private keywords
17 All A template function must have at least ---------- generic data type. Zero One Two Three
Download This Set