adplus-dvertising
11. Which of the following has, compilation error in C ?
a. int n = 32 ;
b. char ch = 65 ;
c. float f= (float) 3.2 ;
d. none of the above
Discuss
Answer: (d).none of the above

12. Which of the following operators can not be overloaded in C+ + ?
a. *
b. +=
c. ==
d. ::
Discuss
Answer: (d).::

13. __________allows to create classes which are derived from other classes, so that they automatically include some of its "parent' s" members plus its own members.
a. Overloading
b. Inheritance
c. Polymorphism
d. Encapsulation
Discuss
Answer: (b).Inheritance

14. The correct way to round off a floating number x to an integer value is
a. y = (int) (x + 0.5)
b. y = int (x + 0.5)
c. y = (int) x + 0.5
d. y = (int)((int)x + 0.5)
Discuss
Answer: (a).y = (int) (x + 0.5)

15. Which of the following correctly describes overloading of functions ?
a. Virtual polymorphism
b. Transient polymorphism
c. Ad-hoc polymorphism
d. Pseudo polymorphism
Discuss
Answer: (c).Ad-hoc polymorphism

16. C++ actually supports the following two complete dynamic systems:
a. One defined by C++ and the other not defined by C
b. One defined by C and one specific to C++
c. Both are specific to C++
d. Both of them are improvements of C
Discuss
Answer: (a).One defined by C++ and the other not defined by C

17. Important advantage of using new and delete operators in C++ is
a. Allocation of memory
b. Frees the memory previously allocated
c. Initialization of memory easily
d. Allocation of memory and frees the memory previously allocated
Discuss
Answer: (d).Allocation of memory and frees the memory previously allocated

18. When an array is passed as parameter to a function, which of the following statements is correct?
a. The function can change values in the original array.
b. In C, parameters are passed by value, the function cannot change the original value in the array.
c. It results in compilation error when the function tries to access the elements in the array.
d. Results in a run time error when the function tries to access the elements in the array.
Discuss
Answer: (a).The function can change values in the original array.

19. What does the following expression means?

char *(*(*a[N]) ()) ();
a. a pointer to a function returning array of n pointers to function returning character pointers
b. a function return array of N pointers to functions returning pointers to characters
c. an array of n pointers to function returning pointers to characters
d. an array of n pointers to function returning pointers to functions returning pointers to characters
Discuss
Answer: (d).an array of n pointers to function returning pointers to functions returning pointers to characters

20. What will be the output of the following 'C' code?

main ( )

{        int x = 128;

          printf("\n%d”, 1 + x ++);

}
a. 128
b. 129
c. 130
d. 131
Discuss
Answer: (b).129

Page 2 of 16