What are the visible and invisible characters of ASCII code in C language
This article mainly explains "what are the visible and invisible characters of ASCII code in C language". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. let's study and learn what visible and invisible characters are in ASCII code in C language.
ASCII (American Standard Code for Information Interchange, American Standard Code for Information Exchange) is a computer coding system based on the Latin alphabet, mainly used to display modern English and other Western European languages. Let's take a look at a sample code that outputs the ASCII code:
# include
Int main (void)
{
Int c
Printf ("\ t character\ t decimal\ n")
For (c = 0; c)
< 128; c++) { printf("\t%c\t%4d\n", c, c); } return 0; } 输出结果发现:
From the output results, it can be found that the display of the characters corresponding to ASCII codes 0-32 and 127 is abnormal, which is not printable characters, non-printable characters are also called control characters, and other characters that can be displayed are printed characters.
The complete ASCII table is as follows (image from network):
From this table, we also see the noun of escape characters. What is the escape character? C language defines some letters preceded by "\" to represent common ASCII characters that cannot be displayed, such as\ t,\ n, etc. used in our code above, are called escape characters, because the following characters are not the original ASCII character meaning.
The corresponding table of escape characters is as follows (the picture is from the network):
Thank you for your reading, the above is the content of "what are the visible and invisible characters of ASCII code in C language?" after the study of this article, I believe you have a deeper understanding of what the visible and invisible characters of ASCII code in C language have, and the specific use still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!