A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

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
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).none of the above

12. Which of the following operators can not be overloaded in C+ + ?
a. *
b. +=
c. ==
d. ::
View Answer Report Discuss Too Difficult! Search Google
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
View Answer Report Discuss Too Difficult! Search Google
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)
View Answer Report Discuss Too Difficult! Search Google
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
View Answer Report Discuss Too Difficult! Search Google
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
View Answer Report Discuss Too Difficult! Search Google
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
View Answer Report Discuss Too Difficult! Search Google
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.
View Answer Report Discuss Too Difficult! Search Google
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
View Answer Report Discuss Too Difficult! Search Google
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
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).129

Page 2 of 16