C++ Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 1)
1.
Which of the following function prototype is perfectly acceptable?
int Function(int Tmp = Show());
float Function(int Tmp = Show(int, float));
Both A and B.
float = Show(int, float) Function(Tmp);
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
19 comments Page 2 of 2.

Sandy said:   1 decade ago
How you can say that show in A is also returning a compatiable or you can int type value. And why not in option B?

Sushovan Das said:   1 decade ago
Option A is correct as in a parameter any other parameter can not be passed.

Karuppusamy said:   1 decade ago
The statement in A only matches with the syntax of a function declaration.

Seema said:   1 decade ago
B is incorrect as how do we send the arguments of function show.
(1)

Kmp said:   9 years ago
Parameters should not be initialized in the function argument.
(3)

Deepak said:   1 decade ago
Parameters are can not be write inside in any parameters.

Sunchuramya said:   1 decade ago
First we should know the logic's to execute a program.
(2)

Durgesh said:   10 years ago
float = Show(int, float) Function(Tmp);
(3)

Vada said:   1 decade ago
First know the logic's to execute.
(2)


Post your comments here:

Your comments will be displayed after verification.