当前位置:网站首页>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
边栏推荐
- [从零开始学习FPGA编程-41]:视野篇 - 摩尔时代与摩尔定律以及后摩尔时代的到来
- [OGeek2019]babyrop
- [mrctf2020] thousand layer routine
- Analog display of the module taking software verifies the correctness of the module taking data, and reversely converts the bin file of the lattice array to display
- [image segmentation] retinal vessel segmentation based on morphology with matlab code
- How to select a third-party software testing company? 2022 ranking of domestic software testing institutions
- 利用微搭低代码实现级联选择
- MFC multithreaded semaphore csemaphore critical area and mutually exclusive events
- A penetration test of c/s Architecture - Request encryption, decryption and test
- 2.1.1 QML grammar foundation I
猜你喜欢

20 not to be missed ES6 tips

How to turn on win11 notebook power saving mode? How to open win11 computer power saving mode
![[GUET-CTF2019]zips](/img/79/22ff5d4a3cdc3fa9e0957ccc9bad4b.png)
[GUET-CTF2019]zips

Combine with (& &) logic or (||), dynamic binding and ternary operation

MaxCompute远程连接,上传、下载数据文件操作

How to connect the Bluetooth headset to the computer and how to connect the win10 computer to the Bluetooth headset

Win10 build webservice

Face pincher: a hot meta universe stylist

两个链表的第一个公共节点_链表中环的入口(剑指offer)

Software performance test analysis and tuning practice path - JMeter's performance pressure test analysis and tuning of RPC Services - manuscript excerpts
随机推荐
How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
[frame rate doubling] development and implementation of FPGA based video frame rate doubling system Verilog
(cve-2020-11978) command injection vulnerability recurrence in airflow DAG [vulhub range]
[WordPress website] 6 Article content copy prevention
Common coding and encryption in penetration testing
阿里云全链路数据治理
L2TP connection failure guide in VPN
The first common node of two linked lists_ The entry of the link in the linked list (Sword finger offer)
Software performance test analysis and tuning practice path - JMeter's performance pressure test analysis and tuning of RPC Services - manuscript excerpts
相機標定(標定目的、原理)
Buuctf misc grab from the doll
get_started_3dsctf_2016
UE常用控制台命令
与(&&)逻辑或(||),动态绑定结合三目运算
Global and Chinese market of offshore furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
How to select a third-party software testing company? 2022 ranking of domestic software testing institutions
Serviceworker working mechanism and life cycle: resource caching and collaborative communication processing
Dichotomous special training
How can win11 set the CPU performance to be fully turned on? How does win11cpu set high performance mode?
Blue Bridge Cup seven segment code (dfs/ shape pressing + parallel search)