Common C language standard library functions

Source: Internet
Author: User

1. mathematical functions

ABS (X)

Cos (X)

FABS (X)

Ceil (x) // calculates the maximum integer not less than X

Floor (x) // returns the smallest integer not greater than X.

Log (x) // calculate the natural logarithm of X

Log10 (x) // calculates the logarithm of X (as low as 10)

Pow (x, y)

Sin (X)

SQRT (X)


2. Character Processing functions

Int isdigit (int c)

Int isalpha (int c)

Int isalnum (INT c) // determines whether C is a number or letter.

Int islower (int c)

Int isupper (int c)

Int toupper (int c)

Int tolower (int c)

3. String

Char * strchr (char * s, int c) // whether the character C is contained

Char * strstr (char * S1, char * S2) // whether S1 contains string S2

Char * strlwr (char * s) // converts all letters in S to lowercase letters.

Char * strupr (char * s) // converts all letters in S into uppercase letters.

Char * strcpy (char * S1, char * S2)

Char * strncpy (char * S1, char * S2, int N)

Char * strcat (char * S1, char * S2)

Int strcmp (char * S1, char * 2)

Int stricmp (char * S1, char * S2)

Int strlen (const char * string)

Char * strncat (char * strdestination, const char * strsource, size_t count)

Int strncmp (const char * string1, const char * string2, size_t count)

Char * strrev (char * string)

Void * memcpy (void * S1, void * S2, int N)

Void * memset (void * s, int C, int N)


4. String Conversion Functions

Int atoi (char * s) // the content of the character is converted into a decimal integer

Float atof (char * s) // the content of the string is converted into a decimal floating point number.

Char * ITOA (INT value, char * string, int Radix) // write the integer value to the string in Radix notation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.