What is the output of following program?
void abc (int x=0, int y, int z) {
cout<< x << y <<z;}
a) abc ()
b) abc (h)
c) abc (h,h)
d) both a & b
Which of the following is correct statement regarding inline function?
a) speeds up execution
b) slos down execution
c) increases the code size
d) both a & c
The compiler identifies a virtual function to be pure…….
a) by the presence of keyword
b) location in program
c) it is equated to 0
d) none of these
If many functions have the same name, which of the following information, if present, will be used by the compiler to invoke the correct function to be used?
a) operator
b) return value of function
c) function signature
d) both a & c
Which of the following parameter passing
mechanism(s) is/are supported by C++, but not by C?
a) pass by value
b) pass by reference
c) pass by value result
d) all of these
Assume that the random number generating function - rand( ), returns an integer between 0 and 10000 (both inclusive). If you want to simulate the throwing of a die using this random function, use the expression…..
a) rand () %6
b) rand () % 6+1
c) rand () % 5+1
d) none of these