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 UNIX has been developed in ________ language JAVA B C FORTRAN
2 The return type of a function that do not return any value must be ________. float int void double
3 If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block? parentheses ( ) braces { } brackets [ ] arrows < >
4 If it is required to copy an array to another array then. Both arrays must be of the same size and data type Both arrays may be of different size Both arrays may be of different data type Both arrays may be of different size and type
5 New and Delete are also used with ___________ and data types as well. Class, Objects Structures, Pointers Both Class and structures None of above
6 When an object of a class is defined inside another class then, Destructor of enclosing class will be called first Destructor of inner object will be called first Constructor and Destructor will be called simultaneously None of the given options
7 New operator is used to allocate memory from the free store during Compile Time Run Time Link Time None of the given options
8 What purpose do classes serve? Data encapsulation Providing a convenient way of modeling real-world objects Simplifying code reuse All of the given options
9 The default value of a parameter can be provided inside the ________________ function prototype function definition both function prototype or function definition none of the given options
10 If there is a symbol (& sign) used with the variable name followed by data type then it refers to _____ and if & is being used with variable name then it refers to _____. Address of variable, reference variable Reference variable, value of variable Reference variable, address of variable Address of variable, value of variable
11 What will be the correct syntax to access the value of fourth element of an array using pointer ptr? ptr[3] (ptr+3) *(ptr+3) Both 1and 3
12 What will be the correct syntax to assign an array named arr of 5 elements to a pointer ptr? *ptr = arr ; ptr = arr ; *ptr = arr[5] ; ptr = arr[5] ;
13 Overloaded new operator function takes parameter of type size_t and returns void (nothing) void pointer object pointer int pointer
14 The statement cin.get (); is used to, Read a string from keyboard Read a character from keyboard Read a string from file Read a character from file
15 What does (*this) represents? The current function of the class The current pointer of the class The current object of the class A value of the data member
16 *.doc is _____________ by type. Sequential File Random Access File Data File Record File
17 Memory allocated at run time is a system resource and it is the responsibility of _____ to de-allocate the memory. System Programmer User of program None of given options
18 The code is written to __________ the program. implement design analysis none of the given options
19 The return type of the operator function for << operator is __________. class for which we overload operator reference of ostream class (ostream&amp;) reference of istream class (istream&amp;) void
20 If text is a pointer of class String then what is meant by the following statement? text = new String [5]; Creates an array of 5 string objects statically creates an array of 5 string objects dynamically Creates an array of pointers to string Creates a string Object
Download This Set