Computer Science, asked by Ollie99, 11 months ago

What is the output?
#mclude<stdio.h>
#define fun(x) (X*X)
int main()
{
float i;
i=64.0/fun(2);
printf("%.2f", i);
return 0;
} ​

Answers

Answered by AskewTronics
0

The above program print the error.

Explanation:

  • The above program is written in the c language, which holds the two type of error:-
  • The first error is in the header file which can be written as "include" in the place of "mclude". It is because "include" is a keyword that is used to add the header file in c language.
  • The second error is in the define statement, which holds the "x*x" in the place of "X*X". It is because the defined function has argument small x, so there is a need to put the small x in the formula also.
  • If any user corrects the above code then the output is 16.00, it is because the formula which is written with the defined statement is replaced by the "fun(x)". So the statement becomes "i=64.0/(2*2)", which initialize the 16.0 value to the i variable.
  • But the value of i will be printed as '16.00" because "%2f" will print the value up to two decimal point.

Learn More:

  • C-Program : https://brainly.in/question/12809215
Answered by mdsrinivasv534197
0

Answer:

tfufodoydoydotfoyfktdlg

Similar questions