Computer Science, asked by jashuabca03, 11 months ago

What will be the output?
#include <stdio.h>
int main()
float a = 6.0;
printf("%.2f", (9/5)*a + 11);
return 0;
a) 21.00
b) 19.00
C) 0.00
d) 17.00​

Answers

Answered by Anonymous
7

Your answer is Option C

0!

Answered by AskewTronics
3

Option d is the correct answer for the above question.

Explanation:

  • The above expression firstly divides the 9 by 5 and takes 1. It is because when it is divided the 9 by 5, then the result will take in the terms of an integer. It is because both the number is written in integer.
  • Then the value is multiplied to the float number which is the value of a variable and makes it 6.00.
  • Then the value is get added to 11 and makes it 17.00.
  • Then the value 17.00 is printed, because there the format string prints the number up to two decimal numbers.

Learn more:

  • Output of C-program : https://brainly.in/question/1478621
Similar questions