VU Final Term Past Papers
95 solved final term past paper MCQs for CS201 (Introduction to Programming) at Virtual University, each with the correct answer marked. Use them to learn the VU question style and test your recall. An independent study tool — not affiliated with VU.
Prefer a summary first? Read the CS201 final term handout.
Q1. When an array is passed to a function then default way of passing this array is,
Q2. Array is a data structure which store
Q3. We can also create an array of user define data type.
Q4. When we define an array of objects then,
Q5. What is the sequence of event(s) when allocating memory using new operator?
Q6. We can delete an array of objects without specifying [] brackets if a class is not doing dynamic memory allocation internally.
Q7. The second parameter of operator functions for are objects of the class for which we are overloading these operators.
Q8. Which of the following is correct way to initialize a variable x of int type with value 10?
Q9. Default mechanism of function calling in case of array is _____ and in case of variable is ___.
Q10. What does STL stand for?
Q11. Skill(s) that is/are needed by programmers .
Q12. For which array, the size of the array should be one more than the number of elements in an array?
Q13. Friend functions are _____ of a class.
Q14. The prototype of friend functions must be written ____ the class and its definition must be written ____
Q15. If overloaded plus operator is implemented as non-member function then which of the following statement will be true for the statement given below? obj3 = obj1 + obj2 ;
Q16. Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?
Q17. For cin, the source is normally a ________ and destination can be ______.
Q18. The programs, in which we allocate static memory, run essentially on ________
Q19. The default value of a parameter can be provided inside the ________________
Q20. While calling function, the arguments are assigned to the parameters from _____________.
Q21. When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are.
Q22. With user-defined data type variables (Objects), self assignment can produce .
Q23. Assignment operator is used to initialize a newly declared object from existing object.
Q24. When an object of a class is defined inside an other class then,
Q25. In the member initializer list, the data members are initialized,
Q26. When a value is referred by a normal variable then it is known as,
Q27. Which of the following function is used to increase the size of already allocated memory chunk?
Q28. Which of the following is NOT a preprocessor directive?
Q29. The stream objects cin and cout are included in which header file?
Q30. Overloaded delete operator function takes the same parameter as an argument returned by new operator function.
Q31. When an array of object is created dynamically then there is no way to provide parameterized constructors for array of objects.
Q32. C is widely known as development language of _______ operating system.
Q33. We can not define a function as a friend of a Template class.
Q34. Like member functions, ______ can also access the private data members of a class.
Q35. Which situation would require the use of a non-member overloaded operator?
Q36. The stream insertion and stream extraction operators are already overloaded for .
Q37. If we define an identifier with the statement #define PI 3.1415926 then during the execution of the program the value of PI __________.
Q38. Assignment operator is ------------------------- associative.
Q39. When ever dynamic memory allocation is made in C/C++, it is freed_____________.
Q40. The appropriate data type to store the number of rows and colums of the matrix is .
Q41. Which of the following function do NOT initialize the chunk of memory to all zero?
Q42. The function free returns back the allocated memory got thorough calloc and malloc to .
Q43. Templates are not type safe.
Q44. We can use New keyword inside of Class Constructor.
Q45. Friend function of a class is ______________ .
Q46. What is the sequence of event(s) when deallocating memory using delete operator?
Q47. Deleting an array of objects without specifying [] brackets may lead to memory leak
Q48. Which of the following data type(s) can operate on modulus operator ‘%’?
Q49. Array is passed by value to a function by default.
Q50. With template function, the compiler automatically detects the passed data and generates a new copy of function using passed data.
Q51. What will be the correct syntax to initialize all elements of two-dimensional array to value 0?
Q52. When an operator function is define as member function then operand on the left side of operator must be an object.
Q53. The keyword is used to return some value from a function.
Q54. Every data member or function inside the structure is by default whereas everything declared inside a class is by default.
Q55. Which of the following is true for the C++ statement given below? int &ref = val ;
Q56. Unary operator implemented as member function takes arguments whereas non-member function takes arguments.
Q57. The input/output streams cin and cout are therefore have .
Q58. If a symbolic constant has been defined, it will be an error to define it again.
Q59. Every class contains .
Q60. Consider the following code segment. class M { public: M &operator+(const M &); ... }; p+q Let assume if p and q are class objects then function is implemented as
Q61. Static variable which is defined in a function is initialized .
Q62. Wecan not define a variable of user-defined data type in the class.
Q63. A constructor that will create a new object with a full copy of the other object, is copy is known as
Q64. In C/C++ the string constant is enclosed _____
Q65. In Flow chart process is represented by
Q66. When we are using const keyword with a variable x then initializing it at the time of declaration is,
Q67. Which of the following is the correct way to assign an integer value 5 to element of a matrix say ‘ ’ at second row and third column?
Q68. Which of the following is the correct statement for the following declaration? const int *ptr.
Q69. What will be the correct syntax to assign an array named arr of 5 elements to a pointer ptr?
Q70. C is a/an language
Q71. The variables having a name, type and size are just like empty boxes.
Q72. What's wrong with this for loop? for (int k = 2, k <=12, k++)
Q73. Most efficient method of dealing with structure variables is to define the structure globally
Q74. Syntax of union is identical to
Q75. There are mainly -------------------- types of software
Q76. When a pointer is incremented, it actually jumps the number of memory addresses
Q77. In functions that return reference, use __________variables.
Q78. The declarator of Plus (+) member operator function is
Q79. The compiler does not provide a copy constructor if we do not provide it
Q80. The operator function of << and >> operators are always the member function of a class.
Q81. If we do not mention any return_value_type with a function, it will return an _____ value.
Q82. Suppose a program contains an array declared as int arr[100]; what will be the size of array?
Q83. The name of an array represents address of first location of array element.
Q84. Reusing the variables in program helps to save the memory
Q85. Which of the following statement is best regarding declaration of friend function?
Q86. The operator function overloaded for an Assignment operator (=) must be
Q87. For non-member operator function, object on left side of the operator may be
Q88. The operator function will be implemented as _____, if obj1 drive the - operator whereas obj2 is passed as arguments to - operator in the statement given below. obj3 = obj1 - obj2;
Q89. The static data members of a class are initialized _______
Q90. Class is a user defined___________.
Q91. We can also define a user-defines manipulators.
Q92. Automatic variable are created on ________.
Q93. Operating System is
Q94. Which one is the correct syntax for defining an identifier PI with preprocessor directive?
Q95. Character strings are arrays of characters that can store