-
What will be the output of the following C code?
#include <stdio.h>
double fun();
int main()
{
fun();
return 0;
}
fun()
{
printf("250");
return 250;
}
-
- 250
- Depends on compiler
- Garbage value
- Compilation Error
- None of these
Correct Option: D
Compilation Error
main.c:8:5: warning: return type defaults to ‘int’ [-Wimplicit-int]
fun()
^~~
main.c:8:5: error: conflicting types for ‘fun’
main.c:2:12: note: previous declaration of ‘fun’ was here
double fun();