| isalnum(ch) | Returns true if ch is either a letter or a decimal digit |
| isalpha(ch) | Returns true if ch is a letter |
| iscntrl(ch) | Returns true if ch is a control character (ASCII 127 or 0 to 31) |
| isdigit(ch) | Returns true if ch is a decimal digit |
| isgraph(ch) | Returns true if ch is printable and nonblank |
| islower(ch) | Returns true if ch is a lowercase letter |
| isprint(ch) | Returns true if ch is printable (including blank) |
| ispunct(ch) | Returns true if ch is a punctuation character |
| isspace(ch) | Returns true if ch is a whitespace character: space, tab, carriage return, new line, or form feed |
| isupper(ch) | Returns true if ch is an uppercase letter |
| isxdigit(ch) | Returns true if ch is a hexidecimal digit |
| toascii(ch) | Returns ASCII code for ch |
| tolower(ch) | Returns the lowercase version of ch if ch is an uppercase letter; otherwise returns ch |
| toupper(ch) | Returns the uppercase version of ch if ch is a lowercase letter; otherwise returns ch |
| acos | Returns the arc cosine |
| asin | Returns the arc sine |
| atan | Returns the arc tangent |
| atan2 | Returns the arc tangent x/y for arguments x and y |
| ceil | Rounds up |
| cos | Returns the cosine |
| cosh | Returns the arc cosine |
| exp | Returns ex |
| fabs | Returns the absolute value |
| floor | Rounds down |
| fmod | Returns x modulo y for arguments x and y |
| frexp | For arguments x and eptr, where x = m * 2e, returns m and sets eptr to point to e |
| ldexp | Returns x * 2e , for arguments x and e |
| log | Returns the natural log |
| log10 | Returns the log base 10 |
| modf | For arguments x and iptr, returns the fractional part of x and sets iptr to point to the integer part of x |
| pow | Returns xy , for arguments x and y |
| sin | Returns the sine |
| sinh | Returns the hyperbolic sine |
| sqrt | Returns the square root |
| tan | Returns the tangent |
| tanh | Returns the hyperbolic tangent |
abort Terminates program execution abnormally
abs Returns the absolute value of an integer
atof Converts a string argument to floating point
atoi Converts a string argument to an integer
exit Terminates program execution
rand() Generates an unsigned int between 0 and RAND_MAX, a named constant
defined in cstdlib header file
srand(unsigned n) Seeds the rand() function so that it generates different
sequences of random numbers. srand is often used in conjunction
with the time function from the ctime library. For example,
srand(time(0));
strcat(toS, fromS) Copies fromS to the end of toS
strncat(toS, fromS, n) Copies at most n characters of fromS to the end
of toS and appends \0
strcmp(str1, str2) Returns an integer that is negative if str1 < str2,
zero if str1 == str2, and positive if str1 > str2
stricmp(str1, str2) Behaves like strcmp, but ignores case
strncmp(str1, str2, n) Behaves like strcmp, but compares the first
n characters of each string
strcpy(toS, fromS) Copies fromS toS
strncpy(toS, fromS, n) Copies n characters of fromS to toS, truncating
or padding with \0 as necessary
strspn(str1, str2) Returns the number of initial consecutive characters
of str1 that are not in str2
strcspn(str1, str2) Returns the number of initial consecutive characters
of str1 that are in str2
strlen(str) Returns the length of str, excluding \0
strlwr(str) Converts any uppercase letters in str to lowercase
without altering other characters
strupr(str) Converts any lowercase letters in str to uppercase
without altering other characters
strchr(str, ch) Returns a pointer to the first occurrence of ch
in str; otherwise returns NULL
strrchr(str, ch) Returns a pointer to the last occurrence of ch in
str; otherwise returns NULL
strpbrk(str1, str2) Returns a pointer to the first character in str1
that also appears in str2; otherwise returns NULL
strstr(str1, str2) Returns a pointer to the first occurrence of str2
in str1; otherwise returns NULL
strtok(str1, str2) Finds the next token in str1 that is followed by
str2, returns a pointer to the token and writes
NULL immediately after the token in str1
class exception
{
public:
exception() throw();
virtual -exception() throw();
exception &operator=(const exception %exc) throw();
virtual const char *what() const throw();
}
setbase(b) Setts number base to b = 8, 10, or 16 setfill(f) Sets fill character to f setprecision(n) Sets floating-point precision to integer n setw(n) Sets field width to integer n
dec Tells subsequent operation to use decimal representation
end1 Inserts new-line character \n and flushes output stream
ends Inserts null character \0 in an output stream
flush Flushes an output stream
hex Tells subsequent I/O operations to use hexadecimal
representation
oct Tells subsequent I/O operation to use octal representation
ws Extracts whitespace characters on input stream
erase() Makes the string empty
erase(pos, len) Removes the substring that begins at position pos and
contains len characters
find(subString) Returns the position of a substring within the string
length() Returns the number of characters in the string
(same as size)
replace(pos, len, str) Replaces the substring that begins at position
pos and contains len characters with the string str
size() Returns the number of characters in ths string
(same as length)
substr(pos, len) Returns the substring that begins at position pos
and contains len characters
Back to the
CISC 181 homepage.
This page has been accessed
times since 26 Sept 2003.
Corrections, suggestions and comments to caviness at cis.udel.edu