-
What will be the output of the following C code?
#include <stdio.h>
void fun();
int main()
{
void fun(int);
fun();
return 0;
}
void fun()
{
printf("200");
}
-
- Compilation Error
- 200
- Runtime Error
- Depends on compiler
- None of these
Correct Option: A
Compilation Error
main.c: In function ‘main’:
main.c:6:9: error: too few arguments to function ‘fun’
fun();
^~~
main.c:5:14: note: declared here
void fun(int);
^~~
main.c: In function ‘fun’:
main.c:10:5: error: number of arguments doesn’t match prototype
{
^
main.c:5:14: error: prototype declaration
void fun(int);