Sail E0 Webinar
Question


There is a error in the below program. Which statement will you add to remove it?


#include<stdio.h>
int main()
{
int a;
a = f(10, 3.14);
printf("%d\n", a);
return 0;
}
float f(int aa, float bb)
{
return ((float)aa + bb);
}
Options:
A .  Add prototype: float f(aa, bb)
B .  Add prototype: float f(int, float)
C .  Add prototype: float f(float, int)
D .  Add prototype: float f(bb, aa)
Answer: Option B

The correct form of function f prototype is float f(int, float);



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers