The C language is accompanied by a number of library functions that carry out various commonly used operations or calculations.
For example ,there are library functions that carry out standard input/output operations (e.g read and write characters,read and write numbers,open and close files,test for end of file etc.)
Some commonly used library functions are
FUNCTION---------TYPE----------------PURPOSE
abs(i)------------int-----------------Return the absolute value of i
getchar()----------int---------------Enter a character from the -------------------------------------standard input device
pow(d1,d2)---------double------------Return d1 raised to the d2 power
printf(...)--------int---------------send data items to the standard -------------------------------------output device
putchar(c)---------int---------------send a character to the standard -------------------------------------output device
sqrt(d)------------double------------return the square root of d
scanf(...)---------int---------------enter data items from the standard -------------------------------------input device
tolower(c)---------int---------------convert letter to lowercase
toupper(c)---------int---------------convert letter to uppercase
Monday, December 7, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment