which of the following functions declaration is legal and which one is illegal
determine while giving reasons
a)double func();
int main(){}
double func(){}
b) double func(){}
int main(){}
c) int main()
{
double func();
}
double func(){ //statement}
Answers
Answered by
4
Function declaration :-
a. double func();
Reason :- it has return type , function name, semi colon.
b. no one correct , all are function definition not function declaration.
c. correct , but not good programming (function declaration must be declared above main function).
Answered by
0
Answer:
c answer is correct answer
Similar questions