5 years ago in C++ Functions

Which of the following function declaration is/are incorrect?

[A] int Sum(int a, int b = 2, int c = 3);
[B] int Sum(int a = 5, int b);
[C] int Sum(int a = 0, int b, int c = 3);
[D] Both B and C are incorrect.
[E] All are correct.
Loading...
Next Question

Overall Stats

Attempted 108
Correct 26
Incorrect 24
Viewed 58

Answers

Guest
Guest
Tooba Mustafa
Tooba Mustafa - 1 month ago

Tooba Mustafa is saying Both B and C are incorrect. is correct answer

Saisha Shetty
Saisha Shetty - 2 months ago

Saisha Shetty is saying All are correct. is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying Both B and C are incorrect. is correct answer

Sarita Nauriya
Sarita Nauriya - 5 months ago

Sarita Nauriya from Hyderabad, India is saying All are correct. is correct answer

pavithra p
pavithra p - 8 months ago

pavithra p from Bengaluru, India is saying Both B and C are incorrect. is correct answer

Related Questions

Which of the following statement is correct?

  • [A] Constructors can have default parameters.
  • [B] Constructors cannot have default parameters.
  • [C] Constructors cannot have more than one default parameter.
  • [D] Constructors can have at most five default parameters.

Which member function of class cannot modify its objects attributes ?

  • [A] friend functions
  • [B] Private member functions
  • [C] Constant member functions
  • [D] Static member functions

A friend function

  • [A] is declared as a friend & defined elsewhere in the program
  • [B] is always an inline function
  • [C] created objects without initialization
  • [D] May be a static member function of the class

The getche() library function

  • [A] returns a character when any key is pressed
  • [B] returns a character when ENTER is pressed
  • [C] displays a character on the screen when any key is pressed
  • [D] does not display a character on the screen

Which of the following statement is correct?

  • [A] Overloaded functions can have at most one default argument.
  • [B] An overloaded function cannot have default argument.
  • [C] All arguments of an overloaded function can be default.
  • [D] A function if overloaded more than once cannot have default argument.