CS-201 Final Term Exams Preparation Virtual University With Answers

image
image
image

CS-201 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
Download This Set