The program is not a valid C program and cannot be compiled successfully. The reason is that the program has two syntax errors:
•The function fun has a void return type, which means it cannot return any value. However, the function tries to return a floating-point value of 3.1415, which is incompatible with the re-turn type. This will cause a compilation error.
•The function main is defined inside the function fun, which is not allowed in C. A function cannot be nested inside another function. This will also cause a compilation error.
To fix these errors, the function fun should have a double return type, and the function main should be defined outside the function fun. For example:
#include
#include
double fun (void) { return 3.1415; }
int main (int argc, char *argv[]) { int i = fun(3.1415); printf(“%d”,i); return 0; }
References = C - Functions - Tutorialspoint, C - return Statement - Tutorialspoint, C Basic Syntax