Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
0 views

IO Lib functions

Uploaded by

Sarthak Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

IO Lib functions

Uploaded by

Sarthak Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Input-Output Library 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.

Non Standard Output


 putch(): The putch() function is used for printing
character to a screen at current cursor location.

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.

You might also like