Computer Science, asked by bharatkumar551999, 10 months ago

What will be the output of the following code?
#include
int main()
{
int p,t,si;
float r;
p=5000;t=4;r=7.5;
si=(p*t*r)/100;
printf("%f",si);
return 0;
}
A)1500.000000
B)0.000000
C)1400.000000
D)compilation error

Answers

Answered by aditya9818
3

Answer:

a 1500 // the which u have given is incorrect btw because the data type is in int not in double

Answered by StaceeLichtenstein
0

Option(b) is the correct answer to the given question .

Explanation:

  • In this header header file is missing if we do not include the header file stdio.h  the compilation error will error firstly we include the header file .
  • Since the 'si" variable is of integer type and in the printf statement  i.e printf("%f",si); does not convert the integer value to the float value their is also warning are occur and it display 0.000000 in the console window also others variable "p" and variable "t" are of int type .
  • that;s the reason all the other options are incorrect .

Learn More:

https://brainly.in/question/9458361

Similar questions