C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » C programs » math.h header file functions

acos() function of math.h in C

acos() function of math.h in C: Learn how to find the acos (Arc Cosine) of a number in C with an Example?
Submitted by Manu Jemini, on April 01, 2018

This function provides the functionality to calculate the arc cosine of a number. The Number should be less than equal to 1 and greater than equal to 0.

This function takes a single parameter as the number whose arc cosine value needs to be calculated and return the value which is the result of the calculation.


    X = 0.2
    The function will return 1.369438 

The Function is a part of the math.h library which should be included in the program before using this function.

math.h - acos() function Example in C

#include <stdio.h>
#include <math.h>

int main()
	// Defining variables
	double a,b;

	// Assigning value for getting acos value
	a = 0.2;

	// Calculating the arc cosine of a
	b = acos(a);

	// Displaying the result for the user
	printf("The calculated value is: %lf \n\n", b);

	return 0;


math.h - acos()  in c language

You may also be interested in...

C/C++ Tips and Tricks...

Was this page helpful? YES NO

Are you a blogger? Join our Blogging forum.

Comments and Discussions