IO Lib functions
IO Lib functions
Math functions
Functions in stdio.h
Standard Input
scanf() : The scanf() function reads formatted input
from stdin.
getchar() : The getchar() function gets a character (an
unsigned char) from stdin.
Standard Output
printf() : The printf() function sends a formatted string
to the standard output (the display).
putchar() : The putchar() function converts entered
value to unsigned char and then writes to the output stream
at the current position.
2
Functions in conio.h
Non Standard Input
getch(): getch() function pauses the Output Console until
a key is pressed. It does not use any buffer to store the input
character. The entered character is immediately returned
without waiting for the enter key.
3
Math functions
Function Description
ceil(number) Rounds up the given number. It returns the integer value
which is greater than or equal to given number.
floor(number) Rounds down the given number. It returns the integer
value which is less than or equal to given number.
sqrt(number) Returns the square root of given number.
pow(base, Returns the power of given number.
exponent)
abs(number) Returns the absolute value of given number.
cbrt(x) Returns the cube root of x.
exp(x) Returns the exponential value of x
mod(x, y) Returns the remainder of x divided by y.
4
Math functions
Function Description
modf(x, &y) Returns the double value which is decimal part of x. The
integer part will be stored as double value at the address
of variable y.
log(x) Returns the natural logarithm (base-e logarithm) of x.
log10(x) Returns the common logarithm (base-10 logarithm) of x.
acos(x) Returns the arccosine of x.
asin(x) Returns the arcsine of x.
atan(x) Returns the arctangent of x.
cos(x) Returns the cosine of x.
sin(x) Returns the sine of x (x is in radians).
tan(x) Returns the tangent of an angle.