TopBottom

Followers



Click on more
SUBSCRIBE

Enter your email address:

Delivered by FeedBurner



VIDEO

Announcement: wanna exchange links? contact me at ravikrak@yahoo.com

STANDARD LIBRARY FUNCTIONS in C

Posted by Ravi Kumar at Friday, September 16, 2011
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

STANDARD LIBRARY FUNCTIONS:

Arithmetic Functions:
abs --> Returns the absolute value of an integer.
cos --> Calculates cosine.
cosh --> Calculates hyperbolic cosine.
exp --> Raises the exponential e to the xth power.
fabs --> Finds absolute value.
floor --> Finds largest integer less than or equal to argument.
fmod --> Finds floating – point remainder.
hypot --> Calculates hypotenuse of right triangle.
log --> Calculates natural logarithm.
log10 --> Calculates base 10 logarithm.
modf --> Breaks down argument into integer and fractional
parts.
pow --> Calculates a value raised to a power.
sin --> Calculates sine
sinh --> Calculates hyperbolic sine.
sqrt --> Finds square root
tan --> Calculates tangent
tanh --> Calculates hyperbolic tangent

Data conversion functions:

atof --> Converts string to float
atoi --> Converts string to int
atol --> Converts string to long
ecvt --> Converts double to string
fcvt --> converts double to string
gcvt --> converts double to string
itoa --> converts int to string
ltoa --> converts long to string
strtod --> converts string to double
strtol --> Converts string to long integer.
strtoul --> Converts string to an unsigned long integer.
ultoa --> Converts unsigned long to string.

Character classification functions:

isalnum --> Tests for alphanumeric character.
isalpha --> Tests for alphabetic character.
isdigit --> Tests for decimal digit
islower --> Tests for lowercase character.
isspace --> Tests for while space character.
isupper --> Tests for uppercase character.
isxdigit --> Tests for hexadecimal digit.
tolower --> Tests character and converts to lowercase if
uppercase.
toupper --> Tests character and converts to uppercase if
lowercase.

String manipulation functions:

strcat --> Appends one string to another
strchr --> Finds first occurrence of a gven character in a
string.
strcmp --> Compares two strings.
strcmpi --> Compares two strings without regard to case
strcpy --> Copies one string to another.
strdup --> Duplicates a string
stricmp --> Compares two strings without regard to case
(identicalto strcmpi)
strlen --> Finds length of a string.
strlwr --> Converts a string to lowercase.
strncat --> Appends a portion of one string to another.
strncmp --> Compares a portion of one string with portion of
another string.
strncpy --> Copies a given number of characters of one string
to another.
strnicmp --> Compares a portion of one string with a portion
of another without regard to case.
strchr --> Finds last occurrence of a given character in a
string
strrev --> Reverse a string.
strset --> Sets all characters in a string to a given
character.
strstr --> Finds first occurrence of a given string in another
string.
strupr --> Converts a string to uppercase.

Searching and sorting functions:

bsearch --> Performs binary search.
lfind --> Performs linear search for a given value.
qsort --> Performs quick sort.

I/O Functions:

close --> Closes a file.
fclose --> closes a file.
feof --> Detects end-of-file.
fgetc -->Reads a character from a file.
fgetchar --> Reads a character from keyboard(function version)
fgets --> Reads a string from a file.
fopen --> Opens a file.
fprintf --> Writes formatted data to a file.
fputc --> writes a character to a file.
fputchar --> Writes a character to screen(function version)
fputs --> writes a string to a file.
fscanf --> Reads formatted data from a file
fseek --> Repositions file pointer to given location.
ftell --> Gets current file Pointer position.
getc --> Reads a character from a file (macro version)
getch --> Reads a character frm the keyboard.
getche --> Reads a character from keyboard and echoes it.
getchar --> Reads a character from keyboard (macro version).
gets --> Reads a line from keyboard.
inport --> Reads a two-byte word from the specified I/O port.
inportb --> Reads one byte from the specified I/O port.
kbhit --> Checks for a keystroke at the keyboard.
lseek --> Repositions file pointer to a given location.
open --> opens a file.
outport --> Writes a two-byte word to the specified I/O port.
outportb --> Writes one byte to the specified I/O port.
printf --> Writes formatted data to screen.
putc --> Writes a character to a file(macro version)
putch --> Writes a character to the screen.
putchar --> Writes a character to screen(macro version)
puts --> writes a line to file.
read --> Reads data from a file.
rewind --> Repositions file pointer to beginning of a file.
scanf --> Reads formatted data from keyboard.
sscanf --> Reads formatted input from a string.
sprintf --> Writes formatted output to a string.
tell --> Gets current file pointer position.
write --> Writes data to a file.

File Handling functions:

remove --> Deletes file.
rename --> Renames file.
unlink --> Deletes file.

Directory Control Functions:

chdir --> Changes current working directory.
getcwd --> Gets current working directory.
fnsplit --> Splits a full path name into its components.
findfirst --> Searches a disk directory.
findnext --> Continues findfirst search.
mkdir --> Makes a new directory.
rmdir --> Removes a directory.

Buffer Manipulation Functions:

memchr --> Returns a pointer to the fiirst occurrence,within
a specified number of characters,of a given
character in the buffer.
memcmp --> Compares a specified number of characters from
two buffers.
memcpy --> Copies a specified number of characters from one
buffer to another.
memicmp --> Compares a specified number of characters from
two buffers without regard to the case of the
characters.
memmove --> Copies a specified number of characters from one
buffer to another.
memset --> Uses a given character to initialize a specified
number of bytes in the buffer.

Disk I/O Functions:

absread --> Reads absolute disk sectors.
abswrite --> Writes absolute disk sectors.
biosdisk --> Performs BIOS disk services.
getdisk --> Gets current drive number.
setdisk --> Sets current disk drive.

Memory Allocation Functions:

calloc --> Allocates a block of memory
farmalloc --> Allocates memory from far heap
farfree --> Frees a block from far heap.
free --> Frees a block allocated with memory.
malloc --> Allocates a block of memory.
realloc --> Reallocates a block of memory.

Process Control Functions:

abort --> Aborts a process
atexit --> Executes function at program termination.
execl --> Executes child process with argument list.
exit --> Terminates the process.
spawnl --> Executes child process with argument list
spawnlp --> Executes child process using PATH variable and
argument list.
system --> Executes an Ms-Dos command.

Graphics Functions:

arc --> Draws an arc.
ellipse --> Draws an ellipse.
floodfill --> Fills an area of the screen with the current
color.
getimage --> stores a screen image in memory.
getlinestyle --> Obtains the current line style.
getpixcel --> Obtains the pixcel's value.
lineto --> Draws a line from the current graphic output
position to the specified point.
moveto --> Moves the current graphic output position to a
specified point.
pieslice --> Draws a pie-slice-shaped figure.
putimage --> Retrieves an image from memory and displays it.
rectangle --> Draws a rectangle.
setcolor --> Sets the current color.
setlinestyle --> Sets the current line style.
putpixel --> Plots a pixel at a specified point.
Setviewport --> Limits graphic output and positions the
logical origin within the limited area.

Time Related Functions:

Clock --> Returns the elapsed cpu time for a process.
difftime --> Computes the difference between two times.
ftime --> Gets current system time as structure.
strdate --> Returns the current system date as a string.
strtime --> Returns the current system time as a string.
time --> Gets current system time as long integer.
setdate --> Sets Dos date.
getdate --> Gets system date.

Miscellaneous Functions:

delay --> Suspends execution for an internal (milli seconds)
getenv --> Gets value of environment variable.
getpsp --> Gets the program segment prefix.
perror --> Prints error message.
putenv --> Adds or modifies value of environment variable.
random --> Generates random numbers.
randomize --> Initializes random number generation with a
random value based on time.
sound --> Turns pc speaker on at specified frequency.
nosound --> Turns pc speaker off.

Dos Interface Functions:

FP-OFF --> Returns offset portion of a far pointer.
FP-SEG --> Returns segment portion of a far pointer.
getvect --> Gets the current value of the specified
interrupt vector.
keep --> Installs terminate-and-stay-resident(TSR) programs.
int86 --> Issues interrupts.
int86x --> Issues interrupts with segment register values.
intdos --> Issues interrupt 21h using registers other than
DX and AL.
intdosx --> Issues interrupt 21h using segment register
values.
MK-FP --> Makes a far pointer.
segread --> Returns current values of segment registers.
setvect --> Sets the current value of the specified interrupt
vector

Share |

Labels:

0 comments:

Post a Comment