Isascii (test whether the character is an ASCII character)

Source: Internet
Author: User
/* Isascii (whether the test character is an ASCII character) function iscntrl header file # include <ctype. h> defines the int isascii (INT c) function. Function Description checks whether the parameter C is an ASCII character, that is, whether the range of C is between 0 and 127. Returns true if the parameter C is an ASCII character; otherwise, returns NULL (0 ). This is a macro definition, not a real function. Example * // * determines whether int I has an ASCII character mapped */# include <stdio. h> # include <ctype. h> main () {int I; for (I = 125; I <130; I ++) if (isascii (I) printf ("% d is an ASCII character: % C \ n ", I, I); else printf (" % d is not an ASCII character \ n ", I);}/* run the 125 is an ASCII character :} 126 is an ASCII character :~ 127 is an ASCII character: 128 is not an ASCII character129 is not an ASCII character */

 

Isascii (test whether the character is an ASCII character)

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.