Introduction to C language function

Source: Internet
Author: User
Tags lowercase mathematical functions

Classification function, where the function library is ctype.h

int isalpha (int ch) If CH is a letter (' A '-' Z ', ' a '-' Z ') returns a value other than 0, otherwise returns 0

int isalnum (int ch) returns 0 if CH is a letter (' A '-' Z ', ' a '-' z ') or a number (' 0 '-' 9 ') returns a value other than 0

int isascii (int ch) If Ch is a character (0-127 in ASCII) returns a value other than 0, otherwise it returns 0

int Iscntrl (int ch) If CH is a voided character (0x7F) or a normal control character (0x00-0x1f) returns a value other than 0, otherwise returns 0

int isdigit (int ch) If CH is a number (' 0 '-' 9 ') returns a value other than 0, otherwise returns 0

int isgraph (int ch) If CH is a printable character (excluding spaces) (0x21-0x7e) returns a value other than 0, or 0

int islower (int ch) returns a value other than 0 if CH is a lowercase letter (' A '-' z '), or 0

int isprint (int ch) If CH is a printable character (with spaces) (0x20-0x7e) returns a value other than 0, otherwise returns 0

int ispunct (int ch) If Ch is a punctuation character (0x00-0x1f) returns a value other than 0, otherwise returns 0

int isspace (int ch) If CH is a space ("), horizontal tab (' \ t '), carriage return (' \ R '), paper wrap (' \f '), Vertical tab (' \v '), line feed (' \ n ') returns a value other than 0, or 0.

int isupper (int ch) If CH is uppercase (' A '-' Z ') returns a value other than 0, otherwise returns 0

int isxdigit (int ch) If CH is a 16 number (' 0 '-' 9 ', ' a '-' f ', ' a '-' F ') returns a non-0 value, otherwise returns 0

int tolower (int ch) If CH is uppercase (' a '-' Z ') returns the corresponding lowercase letter (' A '-' Z ')

int toupper (int ch) returns the corresponding capital letter (' a '-' z ') if CH is a lowercase letter (' A '-' Z ')

Mathematical functions, where the function library is math.h, stdlib.h, String.h, float.h

int abs (int i) returns the absolute value of integral parameter I

Double cabs (struct complex znum) returns the absolute value of the plural znum

Double fabs (double x) returns the absolute value of the double precision parameter x

Long Labs (long N) returns the absolute value of an integer parameter n

Double exp (double x) returns the value of the exponent function ex

Double Frexp (double value,int *eptr) returns the value of x in Value=x*2n, and N is stored in eptr

Double Ldexp (double value,int exp); Returns the value of the Value*2exp

Double log (double x) returns the value of the Logex

Double log10 (double x) returns the value of log10x

Double pow (double x,double y) returns the value of XY

Related Article

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.