adplus-dvertising
frame-decoration

Question

Which of the following statements are correct?

1. C# allows a function to have arguments with default values.
2. C# allows a function to have variable number of arguments.
3. Omitting the return value type in method definition results into an exception.
4. Redefining a method parameter in the method's body causes an exception.
5. params is used to specify the syntax for a function with variable number of arguments.

a.

1, 3, 5

b.

3, 4, 5

c.

2, 5

d.

4, 5

Answer: (c).2, 5

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following statements are correct? 1. C# allows a function to have arguments with default values. 2. C# allows a function to have variable number of arguments. 3....