简体   繁体   中英

Initializing new line character in C language

How do I initialize a new line char in C?

For example, to initialize char A:

char letter = 'A';

How to initialize new line? Like this maybe:

char newLine = '0x0A'?

使用这样的转义字符:

char letter = '\n';

我更喜欢您阅读New Line ,它完整地解释了\\ n \\ r和UNIX EOL和WINDOWS EOL,这非常好。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM