C++ Quiz

1) 
Which of the following function prototype is perfectly acceptable?
1)int Function(int Tmp = Show());
2)float Function(int Tmp = Show(int, float));
3)Both A and B.
4)float = Show(int, float) Function(Tmp);
2) 
Which of the following statement is correct?
1)C++ enables to define functions that take constants as an argument.
2)We cannot change the argument of the function that that are declared as constant.
3)Both A and B.
4)We cannot use the constant while defining the function.

3) 
Which of the following statement is correct?
1)Overloaded functions can have at most one default argument.
2)An overloaded function cannot have default argument.
3)All arguments of an overloaded function can be default.
4)A function if overloaded more than once cannot have default argument.


4)
Which of the following statement is correct?
1)Two functions having same number of argument, order and type of argument can be overloaded if both functions do not have any default argument.
2)Overloaded function must have default arguments.
3)Overloaded function must have default arguments starting from the left of argument list.
4)A function can be overloaded more than once.


5)
Which of the following statement will be correct if the function has three arguments passed to it?
1)The trailing argument will be the default argument.
2)The first argument will be the default argument.
3)The middle argument will be the default argument.
4)All the argument will be the default argument.



ANSWERS:-  A          C        C       D        A

1 comment:

  1. Hello There,


    The challenge however, is we don’t yet know how it will be used making too hard to assess their value proposition and consequently value.

    We are a technology company in South Africa with a few power electronic products containing micros with custom written software in C. We are trying now as non software engineers, with basic understanding of C to try and understand or interpret our software into basic english if I may put it that way. We are the hardware engineers and designed the unit but did not write the software ourselves.

    if I posted sections of code, would someone be able to translate this for us and also write new improved modifications that we require

    But nice Article Mate! Great Information! Keep up the good work!


    Many Thanks,
    Linda

    ReplyDelete