7 years ago in C++ Functions

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.
Loading...
Next Question

Overall Stats

Attempted 53
Correct 15
Incorrect 9
Viewed 29

Answers

Guest
Guest
Blank OP
Blank OP - 4 years ago

Blank OP from Bacolod City, Philippines is saying Constructors can have default parameters. is correct answer

swathi
swathi - 4 years ago

swathi from Chennai, India is saying Constructors cannot have more than one default parameter. is correct answer

Rohan Bhosale
Rohan Bhosale - 4 years ago

Rohan Bhosale from Pune, India is saying Constructors can have default parameters. is correct answer

Neyah Deshmukh
Neyah Deshmukh - 4 years ago

Neyah Deshmukh from India is saying Constructors cannot have more than one default parameter. is correct answer

kamaldeep singh
kamaldeep singh - 4 years ago

kamaldeep singh from India is saying Constructors can have default parameters. is correct answer

Related Questions

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.

When an argument is passed by reference

  • [A] a variable is created in function to hold the argument value
  • [B] the function cannot access the argument value
  • [C] a temporary variable is created in the calling program to hold arguments value
  • [D] None of these

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.

The signature of a function is its ..... ?

  • [A] Function code
  • [B] Prototype
  • [C] Call
  • [D] Parameter list

Static Member function

  • [A] can access any other member function & member variables
  • [B] can access only static member variables & member functions
  • [C] can be only called through object of the class
  • [D] Returns only static data