Some
function in c language is built in within c library(Nothing but some
collection). The library functions are built for sake of ready to use
methodology.Function prototype and body are written within some header file in
case of c programming language. Just programmer’s duty to call those library
function by passing appropriate variable. Depending upon library function we
need to include proper header file also.Some important library function of c
programming language are
String
Manipulation Functions
Copy src string into dest string.
Copy first n characters of string2 to
stringl .
Compare string1 and string2 to
determine alphabetic order.
Compare first n characters of two
strings.
Determine the length of a string.
Concatenate string src to the string
dest.
Concatenate n chracters from string src
to the string dest.
Find first occurrence of character c in
string.
Find last occurrence of character c in
string.
Find first occurrence of string string1
in string2.
Parse the string s into tokens using
delim as delimiter.
Memory
Management Functions
Allocate an array and initialise all
elements to zero .
Free a block of memory.
Allocate a block of memory.
Reallocate (adjust size) a block of
memory.
Buffer
Manipulation
Copies n characters from ct to s and
returns s. s may be corrupted if objects overlap.
Compares at most (the first) n
characters of cs and ct, returning negative value if cs<ct, zero if cs==ct,
positive value if cs>ct.
Returns pointer to first occurrence of
c in first n characters of cs, or NULL if not found.
Replaces each of the first n characters
of s by c and returns s.
Copies n characters from ct to s and
returns s. s will not be corrupted if objects overlap.
Character
Functions
The function returns nonzero if c is
alphanumeric
The function returns nonzero if c is
alphabetic only
The function returns nonzero if c is a
control chracter
The function returns nonzero if c is a
numeric digit
The function returns nonzero if c is
any character for which either isalnum or ispunct returns nonzero.
The function returns nonzero if c is a
lower case character.
The function returns nonzero if c is
space or a character for which isgraph returns nonzero.
The function returns nonzero if c is
punctuation
The function returns nonzero if c is space
character
The function returns nonzero if c is
upper case character
The function returns nonzero if c is
hexa digit
The function returns the corresponding
lowercase letter if one exists and if isupper(c); otherwise, it returns c.
The function returns the corresponding
uppercase letter if one exists and if islower(c); otherwise, it returns c.
Error Handling
Functions
produces a message on standard error
output describing the last error encountered.
returns a string describing the error
code passed in the argument errnum.
These are some library function that is
in built in c library.The function may available depending upon compiler
No comments:
Post a Comment