Atoi() - C library function Program

Declaration : [crayon-5620e13b39f5b332200148/] Explanation : Purpose The C library function int atoi(const char *str) converts the string argument str to an integer (type int). Parameters str ===> This is the string representation of an integral number. Return Value This function returns the converted integral number as an int value. If no valid conversion could be performed it returns zero. Exception C Program : Example The following example shows the usage of atoi() function. [crayon-5620e13b39f92837304542/] Output : [crayon-5620e13b39fb0693694804/]

Atof() - C library function Program

Declaration : [crayon-5620e13b3ba59261098677/] Explanation : Purpose The C library function double atof(const char *str) converts the string argument str to a floating-point number (type double). Parameters str ===> This is the string having the representation of a floating-point number. Return Value This function returns the converted floating point number as a double value. If no valid conversion could be performed it returns zero (0.0). Exception C Program : Example The following example shows the usage of atof() function. [crayon-5620e13b3ba72674689723/]

Atexit() - C library function Program

Declaration : [crayon-5620e13b3c3cc918210236/] Explanation : Purpose The C library function int atexit(void (*func)(void)) causes the specified function func to be called when the program terminates. You can register your termination function anywhere you like but it will be called at the time of program termination. Parameters func ===> This is the function to be called at the termination of the program. Return Value This function returns a zero value if the function is registered successfully otherwise a non-zero value if it is failed. Exception C Program : Example The [...]

Atan2() - C library function Program

Declaration : [crayon-5620e13b3cb3b818916409/] Explanation : Purpose The C library function double atan2(doubly y double x) returns the arc tangent in radians of y/x based on the signs of both values to determine the correct quadrant. Parameters x ===> This is the floating point value representing an x-coordinate.y ===> This is the floating point value representing an y-coordinate. Return Value This function returns the principal arc tangent of y/x in the interval [-pi+pi] radians. Exception C Program : Example The following example shows the usage of atan2() function. [crayon-5620e13b3cb50577307236/]

Atan() - C library function Program

Declaration : [crayon-5620e13b3d2d6100776044/] Explanation : Purpose The C library function double atan(double x) returns the arc tangent of x in radians. Parameters x ===> This is the floating point value. Return Value This function returns the principal arc tangent of x in the interval [-pi/2+pi/2] radians. Exception C Program : Example The following example shows the usage of atan() function. [crayon-5620e13b3d2ed061406146/]

Asin() - C library function Program

Declaration : [crayon-5620e13b3dae2062646217/] Explanation : Purpose The C library function double asin(double x) returns the arc sine of x in radians. Parameters x ===> This is the floating point value in the interval [-1+1]. Return Value This function returns the arc sine of x in the interval [-pi/2+pi/2] radians. Exception C Program : Example The following example shows the usage of asin() function. [crayon-5620e13b3daf7130859044/]

Asctime() - C library function Program

Declaration : [crayon-5620e13b3e243960459986/] Explanation : Purpose The C library function char *asctime(const struct tm *timeptr) returns a pointer to a string which represents the day and time of the structure struct timeptr. Parameters Return Value This function returns a C string containing the date and time information in a human-readable format Www Mmm dd hh:mm:ss yyyy Where Www is the weekday Mmm the month in letters dd the day of the month hh:mm:ss the time and yyyy the year. Exception C Program : Example The following example shows [...]

Acos() - C library function Program

Declaration : [crayon-5620e13b3e9ac824513232/] Explanation : Purpose The C library function double acos(double x) returns the arc cosine of x in radians. Parameters x ===> This is the floating point value in the interval [-1+1]. Return Value This function returns principal arc cosine of x in the interval [0 pi] radians. Exception C Program : Example The following example shows the usage of acos() function. [crayon-5620e13b3e9c0177657671/]

Abs() - C library function Program

Declaration : [crayon-5620e13b3f1cb593110483/] Explanation : Purpose The C library function int abs(int x) returns the absolute value of int x. Parameters x ===> This is the integral value. Return Value This function returns the absolute value of x. Header File math.h Exception C Program : Example The following example shows the usage of abs() function. [crayon-5620e13b3f1e1302306514/]

Abort() - C library function Program

Declaration : [crayon-5620e13b3fae7725510200/] Explanation : Purpose The C library function void abort(void) abort the program execution and comes out directly from the place of the call. Parameters NA Return Value This function does not return any value. Header Filestdlib.hException C Program : Example The following example shows the usage of abort() function. [crayon-5620e13b3fafa581365509/] In this case we don't have invisible.txt file present in the directory so when we compile the above program then output of the program will be like this - [crayon-5620e13b3fb15505330364/]

Atol() - C Library function Program

Declaration : [crayon-5620e13b4043c659441898/] Explanation : Purpose The C library function long int atol(const char *str) converts the string argument str to a long integer (type long int). Parameters str ===> This is the string containing the representation of an integral number. Return Value This function returns the converted integral number as a long int. If no valid conversion could be performed it returns zero. Header File ctype.h Exception C Program : Example See below example of atol() function. [crayon-5620e13b40450830019925/] Output : [crayon-5620e13b4045e081601779/]