Point out the error in the following program main() { int a=10; void f(); a=f(); printf("n%d",a); } void f() { printf("nHi"); }

The program is trying to collect the value of a "void" function into an integer variable.


This question is related to Sonata Interview

Showing Answers 1 - 1 of 1 Answers

Vipul

  • Jan 3rd, 2006
 

There is no argument in the function f().So function can't return any value.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions