7 years ago in C++ Functions

Which of the following function prototype is perfectly acceptable?

[A] int Function(int Tmp = Show());
[B] float Function(int Tmp = Show(int, float));
[C] Both A and B.
[D] float = Show(int, float) Function(Tmp);
Loading...
Next Question

Overall Stats

Attempted 58
Correct 8
Incorrect 16
Viewed 34

Answers

Guest
Guest
Blank OP
Blank OP - 4 years ago

Blank OP from Bacolod City, Philippines is saying int Function(int Tmp = Show()); is correct answer

swathi
swathi - 4 years ago

swathi from Chennai, India is saying float = Show(int, float) Function(Tmp); is correct answer

Rohan Bhosale
Rohan Bhosale - 4 years ago

Rohan Bhosale from Pune, India is saying Both A and B. is correct answer

Neyah Deshmukh
Neyah Deshmukh - 4 years ago

Neyah Deshmukh from India is saying Both A and B. is correct answer

Muhammad Asghar
Muhammad Asghar - 4 years ago

Muhammad Asghar from Vehari, Pakistan is saying int Function(int Tmp = Show()); is correct answer

Related Questions

A static function

  • [A] should be called when an object is destroyed
  • [B] is closely connected with an individual object of a class
  • [C] can be called using the class name and function
  • [D] is used when a dummy object must be created

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

Which of the following statement is incorrect?

  • [A] Default arguments can be provided for pointers to functions.
  • [B] A function can have all its arguments as default.
  • [C] Default argument cannot be provided for pointers to functions.
  • [D] A default argument cannot be redefined in later declaration.

One of the disadvantage of pass by reference is that the called function may inadvertently corrupt the called data.This is avoided by ?

  • [A] passing pointers
  • [B] declaring the formal parameters constant
  • [C] declaring the actual parameters constant
  • [D] all of above

Dividing a program into functions

  • [A] is the key to object oriented programming
  • [B] makes the program easier to conceptualize
  • [C] makes the program run faster
  • [D] both (B) and (C)