Computer
Programming
Advantages of Functions:
There are many advantages in using functions:
- It makes possible top down modular programming. In this style of programming, the high level logic of the overall problem is solved first while the details of each lower level functions is addressed later.
- The length of the source program can be reduced by using functions at appropriate places.
- It becomes uncomplicated to locate and separate a faulty function for further study.
- A function may be used later by many other programs this means that a c programmer can use function written by others.
- A function can be used to keep away from rewriting the same block of codes which we are going use two or more locations in a program. This is especially useful if the code involved is long or complicated.
All C Functions
manipulate strings |
|
define variables |
|
display an error message |
|
conditional operators |
|
insert the contents of another file |
|
set line and file information |
|
implementation specific command |
|
used to undefine variables |
|
miscellaneous preprocessor variables |
|
stops the program |
|
absolute value |
|
arc cosine |
|
a textual version of the time |
|
arc sine |
|
stops the program if an expression isn't true |
|
arc tangent, using signs to determine quadrants |
|
sets a function to be called when the program exits |
|
converts a string to a double |
|
converts a string to an integer |
|
converts a string to a long |
|
perform a binary search |
|
allocates and clears a chunk of memory |
|
the smallest integer not less than a certain value |
|
clears errors |
|
returns the amount of time that the program has been running |
|
cosine |
|
hyperbolic cosine |
|
returns a specifically formatted version of the time |
|
the difference between two times |
|
returns the quotient and remainder of a division |
|
stop the program |
|
returns āeā raised to a given power |
|
absolute value for floating-point numbers |
|
close a file |
|
true if at the end-of-file |
|
checks for a file error |
|
writes the contents of the output buffer |
|
get a character from a stream |
|
get the file position indicator |
|
get a string of characters from a stream |
|
returns the largest integer not greater than a given value |
|
returns the remainder of a division |
|
open a file |
|
print formatted output to a file |
|
write a character to a file |
|
write a string to a file |
|
read from a file |
|
returns previously allocated memory to the operating system |
|
open an existing stream with a different name |
|
decomposes a number into scientific notation |
|
read formatted input from a file |
|
move to a specific location in a file |
|
move to a specific location in a file |
|
returns the current file position indicator |
|
write to a file |
|
read a character from a file |
|
read a character from STDIN |
|
get enviornment information about a variable |
|
read a string from STDIN |
|
returns a pointer to the current Greenwich Mean Time |
|
true if a character is alphanumeric |
|
true if a character is alphabetic |
|
true if a character is a control character |
|
true if a character is a digit |
|
true if a character is a graphical character |
|
true if a character is lowercase |
|
true if a character is a printing character |
|
true if a character is punctuation |
|
true if a character is a space character |
|
true if a character is an uppercase character |
|
true if a character is a hexidecimal character |
|
absolute value for long integers |
|
computes a number in scientific notation |
|
returns the quotient and remainder of a division, in long integer form |
|
returns a pointer to the current time |
|
natural logarithm |
|
natural logarithm, in base 10 |
|
start execution at a certain point in the program |
|
allocates memory |
|
searches an array for the first occurance of a character |
|
compares two buffers |
|
copies one buffer to another |
|
moves one buffer to another |
|
fills a buffer with a character |
|
returns the calendar version of a given time |
|
decomposes a number into integer and fractional parts |
|
displays a string version of the current error to STDERR |
|
returns a given number raised to another number |
|
write formatted output to STDOUT |
|
write a character to a stream |
|
write a character to STDOUT |
|
add/modify the environmental settings |
|
write a string to STDOUT |
|
perform a quicksort |
|
send a signal to the program |
|
returns a pseudorandom number |
|
changes the size of previously allocated memory |
|
erase a file |
|
rename a file |
|
move the file position indicator to the beginning of a file |
|
read formatted input from STDIN |
|
set the buffer for a specific stream |
|
set execution to start at a certain point |
|
sets the current locale |
|
set the buffer and size for a specific stream |
|
register a function as a signal handler |
|
sine |
|
hyperbolic sine |
|
write formatted output to a buffer |
|
square root |
|
initialize the random number generator |
|
read formatted input from a buffer |
|
concatenates two strings |
|
finds the first occurance of a character in a string |
|
compares two strings |
|
compares two strings in accordance to the current locale |
|
copies one string to another |
|
searches one string for any characters in another |
|
returns a text version of a given error code |
|
returns individual elements of the date and time |
|
returns the length of a given string |
|
concatenates a certain amount of characters of two strings |
|
compares a certain amount of characters of two strings |
|
copies a certain amount of characters from one string to another |
|
finds the first location of any character in one string, in another string |
|
finds the last occurance of a character in a string |
|
returns the length of a substring of characters of a string |
|
finds the first occurance of a substring of characters |
|
converts a string to a double |
|
finds the next token in a string |
|
converts a string to a long |
|
converts a string to an unsigned long |
|
converts a substring so that it can be used by string comparison functions |
|
perform a system call |
|
tangent |
|
hyperbolic tangent |
|
returns the current calendar time of the system |
|
return a pointer to a temporary file |
|
return a unique filename |
|
converts a character to lowercase |
|
converts a character to uppercase |
|
puts a character back into a stream |
|
use variable length parameter lists |
|
write formatted output with variable argument lists |
|
gets formatted input from stdin with variable argument lists |
The reference site for this content is http://www.cppreference.com/wiki/c/all




