CS-201 Final Term Exams Preparation Virtual University With Answers

CS-201 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 Which of the following function do NOT initialize the chunk of memory to all zero? calloc() function Both malloc() and calloc() None of the above malloc() function
2 The appropriate data type to store the number of rows and colums of the matrix is____________. float int (Not sure) char none of the given options
3 When ever dynamic memory allocation is made in C/C++, it is freed_____________. Explicitly Implicitly Both explicitly and implicitly None of the given options
4 Assignment operator is -------------------------associative. right left binary unary
5 If we define an identifier with the statement #define PI 3.1415926 then during the execution of the program the value of PI __________. can not be replaced None of the given options Remain constant can be changed by some operation
6 The stream insertion and stream extraction operators are already overloaded for ______. User-defined data types Built-in data types http://www.sstutor.com/cpp/stream1.htm User-defined and built-in data types None of the given options
7 Which situation would require the use of a non-member overloaded operator? The overloaded operator is an Assignment operator The left most operand is an object of a class The left operand is built-in data type The operator returns a reference
8 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
9 new and delete are _____ whereas malloc and free are _____. Functions, operators Classes, operators Operators, functions Operators, classes
10 _______ is used to trace the logic of the program and correct the logical errors. Compiler Editor Linker Debugger
Download This Set

Is this page helpful?