What is the difference between \r and \n?

后端 未结 9 2325
庸人自扰
庸人自扰 2020-11-22 06:20

How are \\r and \\n different? I think it has something to do with Unix vs. Windows vs. Mac, but I\'m not sure exactly how they\'re different, and

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 07:13

    \r is Carriage Return; \n is New Line (Line Feed) ... depends on the OS as to what each means. Read this article for more on the difference between '\n' and '\r\n' ... in C.

提交回复
热议问题