Lesson 11: Standard Library Functions.

Prev || Home

Following is the list of selected standard library functions. The functions have been classified into broad categories.

Arithematic Functions:

1) abs() - Retyrns the absolute value of an integer.

2) cos() - Calculate cosine.

3) exp() - Raises the exponential e to the xth power.

4) floor() - Finds largest integer less than or equal to argument.

5) log() - Calculates natural logarithm.

6) log10 - Calculates base 10 logarithm.

7) pow() - Calculates a value of raised power.

8) sin() - Calculates sine.

9) sqrt() - Calculates square root.

10) tan() - Calculates tangent.

Data Conversion Functions:

1) atof() - Converts string to float.

2) atoi() - Converts string to integer.

3) atol()- Converts string to long.

4) ecvt() - Converts double to string.

5) itoa() - Converts int to string.

6) ltoa() - Converts long to string.

7) strtod() - Converts string to double.

8) strtll() - Converts string to long integer.

9) strtoul - Converts string to unsigned long integer.

10) ultoa() - Converts unsigned long to string.

Character Classification Functions:

1) isalnum() - Tests for alphanumeric character.

2) isalpha() - Test for alphabetic character.

3) isdigit() - Test for decimal digit.

4) islower() - Test for lower case.

5) isprint() - Test for printable character.

6) ispunct() - Test for punctuation mark.

7) isspace() - Test for a white space character.

8) isupper() - Test for an uppercase character.

9) tolower() - Test character and converts to lower case if uppercase.

10) toupper() - Text character and converts to uppercase if lowercase.

The above functions return a non-zero value if they are true otherwise returns zero if they are false.

String Manipulation Functions:

1) strcat() - Appends one string to another.

2) strchr() - Finds first occurence of a given character in a string.

3) strcmp() - Compares two strings.

4) strcmpi() - Compares two strings without regard to case.

5) strcpy() - Copies one string to another.

6) strlen() - Finds length of a string.

7) strlwr() - Converts a string to lower case.

8) strupr() - Converts a string to upper case.

9) strstr() - Finds first occurence of a given string in another string.

10) strrev() - Reverse a string.

File Handling Functions:

1) remove() - Deletes files.

2) rename() - Renames file.

Memory Allocation Functions:

1) calloc() - Allocates a block of memory.

2) free() - Frees a block allocated with malloc.

3) malloc() - Allovcates a block of memory.

Process Control Functions:

1) abort() - Abort a process.

2) exit() - Terminates the process.

3) system() - Executes an MS-DOS command.

Time Related Functions:

1) clock() - Returns the elapsed CPU time for a process.

2) difftime() - Computed the difference between two times.

3) ftime() - Gets current system time as structure.

4) strdate() - Returns the current system date as a string.

5) strtime() - Returns the current system timje as a string.

6) time() - Gets current system time as a long integer.

7) setdate() - Sets DOS date.

8) getdate() - Get system date.

Prev || Home