当前位置:网站首页>C escape character
C escape character
2022-06-24 07:39:00 【Charming】
1. C Commonly used escape characters
1) \t : A tab stop , Realize the function of alignment
2) \n : A newline
3) \\ : One \
4) \" : One "
5) \' : One '
6) \r : A carriage return printf(" Zhang Wuji, Zhao minzhou \r Zhi Ruo Xiaozhao ");
- explain 2. Application example
\tUse of tab stops
#include <stdio.h>
void main(){
printf(" Beijing \t Shanghai \t Guangzhou \t Shenzhen ");
// Keep the console from exiting
getchar();
}\nLine feed use :
#include <stdio.h>
void main(){
printf(" Zhang three said :\n Hello !");
getchar();
}\\: first\It's the escape character , the second\It's output\#include <stdio.h> void main(){ printf("hello,\\world!"); getchar(); }4.Insert picture description here \rSaid the enterprintf(" Zhang Wuji, Zhao minzhou \r Zhi Ruo Xiaozhao ");#include <stdio.h> void main(){ printf(" Zhang Wuji, Zhao minzhou \r Zhi Ruo Xiaozhao "); getchar(); }3. practice #include <stdio.h> void main(){ printf(" full name \t Age \t Native place \t address \njohn\t12\t hebei \t Beijing "); getchar(); }Insert picture description here Insert picture description here - analysis : First, the output
Zhang Wuji, Zhao minzhou, Find a \r enter , Will put the frontFour characters(Zhang Wuji Zhao) Cover up , because \r There are four characters after enter , So the result of overwriting the first four characters :Zhiruo xiaozhaomin Zhou. - The cursor finds that enter is directly positioned at
Zhang, Put... DirectlyZhang Wuji ZhaoReplace it with - requirement : Please use an output statement , Achieve the effect of outputting the following graphics
Insert picture description here
边栏推荐
- Global and Chinese market of bed former 2022-2028: Research Report on technology, participants, trends, market size and share
- 20个不容错过的ES6技巧
- How to turn on win11 notebook power saving mode? How to open win11 computer power saving mode
- Learning to use BACnet gateway of building control system is not so difficult
- [frame rate doubling] development and implementation of FPGA based video frame rate doubling system Verilog
- Obtain the package name, application name, icon, etc. of the uninstalled APK through packagemanager. There is a small message
- MySQL - three tables (student, course, score) to query the name, number and score of students whose course is mathematics
- What is an intrusion detection system?
- 相機標定(標定目的、原理)
- [WordPress website] 6 Article content copy prevention
猜你喜欢

利用微搭低代码实现级联选择

在终端pip install xxx但在pycharm却no module named xxx

How can win11 set the CPU performance to be fully turned on? How does win11cpu set high performance mode?

Face pincher: a hot meta universe stylist
![[wustctf2020] climb](/img/b6/4a0582144c3125e7a0666bbbbfe29d.png)
[wustctf2020] climb

使用SystemParametersInfo访问用户界面设置

Tutorial on simple use of Modbus to BACnet gateway
![[Proteus] Arduino uno + ds1307+lcd1602 time display](/img/96/d8c1cacc8a633c679b1a58a1eb8cb9.png)
[Proteus] Arduino uno + ds1307+lcd1602 time display
![[MRCTF2020]千层套路](/img/8e/d7b6e7025b87ea0f43a6123760a113.png)
[MRCTF2020]千层套路

MySQL - three tables (student, course, score) to query the name, number and score of students whose course is mathematics
随机推荐
【Vulhub靶场】】zabbix-SQL注入(CVE-2016-10134)漏洞复现
Deploy L2TP in VPN (Part 1)
游戏思考14:对cache_server缓冲服务器的问题思考(读云峰博客有感)
Counter attack from outsourcing to big factories! Android has been developed for 5 years, and after a year of dormancy, it has tried to become an offer harvester. Tencent has a fixed salary of 20*15
Win11 points how to divide disks? How to divide disks in win11 system?
[vulhub shooting range]] ZABBIX SQL injection (cve-2016-10134) vulnerability recurrence
Group policy disables command prompt bypass
The latest crawler tutorial in 2021: video demonstration of web crawling
jarvisoj_level2
Global and Chinese market of offshore furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
[WordPress website] 5 Set code highlight
Graduation season advance technology
Black box and white box models for interpretable AI
RDD基础知识点
How to distinguish PAAS, IAAs and SaaS?
Global and Chinese market of anion sanitary napkins 2022-2028: Research Report on technology, participants, trends, market size and share
MSSQL high permission injection write horse to Chinese path
PCL calculates the area of a polygon
Canal installation configuration
[tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design