当前位置:网站首页>Summary of whitespace, space and escape characters in C language
Summary of whitespace, space and escape characters in C language
2022-08-10 10:04:00 【An Ran_】
1. What are whitespace, space, and escape characters?
(1) Space characters, tabs, newlines, etc. are collectively referred to as whitespace.
(2) Space character, not equivalent to The
key on the keyboard does not exist on the keyboard. It is not a space, but it can play the effect of a space and occupy a character position.(3) Escape character, all ASCII code can be represented by "\" plus a number (usually an octal number).And C defines some letters before adding "\" to indicate common ones that cannot be displayedASCII characters, such as \0,\t,\n, etc., are called escape characters, because the following character is not its original ASCII character meaning.
Two, related extension
①Whitespace is only used in character constants and string constant works. When it appears in other places, it only plays the role of interval. CompileThe program ignores them.Therefore, the use of whitespace in the program does not affect the compiled program, but the use of whitespace in the program appropriate places will increase the clarity and feasibility of the program.readability.
②
Chinese name space character
Input method Use the system's own characterEnter function, enter notepad——Hold Alt + Numpad, enter 127 in turn, and release the Alt key after typing
③All escape characters and their corresponding meanings:
The ones in bold are the ones I use a lot when I do exercises at present
Escape character
Meaning
ASCII value (decimal)
\a
Bell (BEL)
007
\b
Backspace (BS), move the current position to the previous column
008
\f
Form feed (FF), move the current position to the beginning of the next page
012
\n
Line feed (LF), move the current position to the beginning of the next line
td>010
\r
Carriage Return (CR), move the current position to the beginning of the line
013
\t
Horizontal Tabulation (HT) (skip to next TAB position)
009
\v
Vertical Tabulation (VT)
011
\\
represents a backslash character ''\'
092
\'
represents a single quote (apostrophe) character
039
\"
represents a double quote character
034
\?
represents a question mark
063
\0
Null character (NUL)
000
\ddd
Any character represented by 1 to 3 octal digits
Octal with three digits
\xhh
Any character represented in hexadecimal
hex
3. Summary of topic points
1. The difference between space character and blank character
For example: when counting the number of various characters, is it ' ' or '\t', '\n', etc.
Note: Reference: Baidu Encyclopedia
边栏推荐
- MySQL executes the query process
- 负载均衡原理分析与源码解读
- 讯飞翻译机抢镜背后,跨语种沟通迈入全新时代
- Behind iFLYTEK's translation machine stealing the spotlight, cross-language communication has entered a new era
- 【Software Exam System Architect】Case Analysis ⑥ Web Application System Architecture Design
- keepalived:双主配置
- 「业务架构」TOGAF建模:业务功能分解图
- 高通 msm8953 LCD 休眠/唤醒 流程
- ZZULIOJ 1124: 两个有序数组合并
- 定时任务Quartz
猜你喜欢
随机推荐
跨公网环境,路由策略,进行设备的访问
Static关键字及应用,继承的概念
Payment x Aggregation x Ledger Separation - The Way to Avoid Risk of "Erqing" on the Return Platform
makefile 杂项
「微服务架构」编曲与编舞——让系统协同工作的不同模式
[Concept of Theory of Knowledge] "Progress in the Theory of Reason" University of Leuven 2022 latest 220-page doctoral dissertation
腾讯发布四足机器人 Max 二代版本,梅花桩上完成跳跃、空翻
"Microservice Architecture" Arrangement and Choreography - Different Models for Making Systems Work Together
14 high-frequency handwritten JS interview questions and answers to consolidate your JS foundation
13 【script setup 总结】
Which is the strongest workflow engine for "Technology Selection"?Chief Architecture Helps You Pick
「敏捷建模」纪律:敏捷设计理念
ESP8266-Arduino编程实例-MQ-7一氧化碳传感器驱动
dedecms supports one-click upload of Word content
LeetCode Algorithm 914. 卡牌分组
ESP8266-Arduino编程实例-MQ-9 一氧化碳可燃气体传感器驱动
keepalived:双主配置
04 【计算属性 侦听器】
12 【其它组合式API】
Relearn bubble sort









