C Programming - Functions - Discussion

Discussion Forum : Functions - Find Output of Program (Q.No. 20)
20.
What will be the output of the program?
#include<stdio.h>
int fun(int);
int main()
{
    float k=3;
    fun(k=fun(fun(k)));
    printf("%f\n", k);
    return 0;
}
int fun(int i)
{
    i++;
    return i;
}
5.000000
3.000000
Garbage value
4.000000
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
21 comments Page 3 of 3.

Preethi said:   1 decade ago
Can anyone explain me this program?


Post your comments here:

Your comments will be displayed after verification.