C sqrt() Function

Last Updated:

C sqrt()

The sqrt() function returns the square root of the given number.

This function is defined in <math.h> header file.

Example

C Compiler
#include <stdio.h> #include <math.h> int main() { printf("%lf", sqrt(25)); return 0; }

Syntax

sqrt(x)

Parameter Values

ValueTypeExplanation
x Required Specifies a number.

Return Value

ValueExplanation
Number Returns the square root of the given number.

Share this Page

Meet the Author