Sail E0 Webinar
Question


What will be the output of the program?


#include<stdio.h>
#include<math.h>
int main()
{
printf("%f\n", sqrt(36.0));
return 0;
}
Options:
A .  6.0
B .  6
C .  6.000000
D .  Error: Prototype sqrt() not found.
Answer: Option C

printf("%f`setminus`n", sqrt(36.0)); It prints the square root of 36 in the float format

(i.e 6.000000).

Declaration Syntax: double sqrt(double x) calculates and return the positive

 square root of the given number.




Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers