Question
#include <stdio.h>
void foo();
int main()
{
void foo(int);
foo(1);
return 0;
}
void foo(int i)
{
printf("2 ");
}
a.
2
b.
Compile time error
c.
Depends on the compiler
d.
Depends on the standard
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this C code? #include <stdio.h> void foo(); int main() { void foo(int); foo(1); return 0; } void...
Similar Questions
Discover Related MCQs
Q. What is the output of this C code?
include <stdio.h>
void m()
{
printf("hi");
}
void main()
{
m();
}
View solution
Q. Which of the following is a correct format for declaration of function?
View solution
Q. Which of the following function declaration is illegal?
View solution
Q. Which function definition will run correctly?
View solution
Q. Can we use a function as a parameter of another function?
View solution
Q. The value obtained in the function is given back to main by using ________ keyword?
View solution
Q. What is the return-type of the function sqrt() ?
View solution
Q. Which of the following function declaration is illegal?
View solution
Q. What is the problem in the following declarations?
int func(int);
double func(int);
int func(float);
View solution
Q. What is the default return type if it is not specified in function definition?
View solution
Q. functions can return structure in c?
View solution
Q. functions can return enumeration constants in c?
View solution
Q. Functions in C are ALWAYS:
View solution
Q. Global variables are:
View solution
Q. Property of external variable to be accessed by any source file is called by C90 standard as
View solution
Q. What is the scope of an external variable?
View solution
Q. What is the scope of a function?
View solution
Q. Array sizes are optional during array declaration by using ______ keyword.
View solution
Q. Which of following is not accepted in C?
View solution
Q. Which of the following cannot be static in C?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!