C Programming - Declarations and Initializations - Discussion
Discussion Forum : Declarations and Initializations - Find Output of Program (Q.No. 8)
8.
What is the output of the program
#include<stdio.h>
int main()
{
extern int fun(float);
int a;
a = fun(3.14);
printf("%d\n", a);
return 0;
}
int fun(int aa)
{
return (int)++aa;
}
Answer: Option
Explanation:
2 Errors
1. Type mismatch in redeclaration of fun
2. Type mismatch in parameter aa
1. Type mismatch in redeclaration of fun
2. Type mismatch in parameter aa
Discussion:
35 comments Page 4 of 4.
Palak agrawal said:
1 decade ago
How is possible? and what is floatt?
Dnyanu said:
9 years ago
Thank you all for the explanation.
(1)
Panu said:
9 years ago
How two functions are mismatch?
Sam said:
1 decade ago
What is redeclaration of fun?
Lakshmi said:
7 years ago
Why ++aa?
It can be ++a.
It can be ++a.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers