0x0D,0x0A,0x1A分别指的是什么?

yerssa 2010-05-06 09:54:31
0x0D,0x0A,0x1A分别指的是什么?
...全文
4532 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
crifan 2012-08-13
  • 打赏
  • 举报
回复
【详解】回车 换行 0x0D 0x0A CR LF \r \n的来龙去脉
http://www.crifan.com/detailed_carriage_return_0x0d_0x0a_cr_lf__r__n_the_context/
技术僧 2010-05-08
  • 打赏
  • 举报
回复
回车,换行,提交
sixbusy 2010-05-08
  • 打赏
  • 举报
回复
你是要发短信吧!
0x0d 0x0a 是回车换行
0x1A 就是 ctrl+z

但 通常是
0x1A 0x0d 0x0a
短信 + 0x1a 是必须的 0x0d 0x0a 表示 AT 指令结束!
chaoliu1024 2010-05-07
  • 打赏
  • 举报
回复
16进制,自己打印下就知道了啊
weilong8998 2010-05-07
  • 打赏
  • 举报
回复
16进制呀
赵4老师 2010-05-07
  • 打赏
  • 举报
回复
《计算机组成原理》
和C语言数字常量语法:
C++ Integer Constants
Integer constants are constant data elements that have no fractional parts or exponents. They always begin with a digit. You can specify integer constants in decimal, octal, or hexadecimal form. They can specify signed or unsigned types and long or short types.

Syntax

integer-constant :

decimal-constant integer-suffixopt
octal-constant integer-suffixopt
hexadecimal-constant integer-suffixopt
'c-char-sequence'

decimal-constant :

nonzero-digit
decimal-constant digit

octal-constant :

0
octal-constant octal-digit

hexadecimal-constant :

0x hexadecimal-digit
0X hexadecimal-digit
hexadecimal-constant hexadecimal-digit

nonzero-digit : one of

1 2 3 4 5 6 7 8 9

octal-digit : one of

0 1 2 3 4 5 6 7

hexadecimal-digit : one of

0 1 2 3 4 5 6 7 8 9
a b c d e f
A B C D E F

integer-suffix :

unsigned-suffix long-suffixopt
long-suffix unsigned-suffixopt

unsigned-suffix : one of

u U

long-suffix : one of

l L

64-bit integer-suffix :

i64

To specify integer constants using octal or hexadecimal notation, use a prefix that denotes the base. To specify an integer constant of a given integral type, use a suffix that denotes the type.

To specify a decimal constant, begin the specification with a nonzero digit. For example:

int i = 157; // Decimal constant
int j = 0198; // Not a decimal number; erroneous octal constant
int k = 0365; // Leading zero specifies octal constant, not decimal

To specify an octal constant, begin the specification with 0, followed by a sequence of digits in the range 0 through 7. The digits 8 and 9 are errors in specifying an octal constant. For example:

int i = 0377; // Octal constant
int j = 0397; // Error: 9 is not an octal digit

To specify a hexadecimal constant, begin the specification with 0x or 0X (the case of the “x” does not matter), followed by a sequence of digits in the range 0 through 9 and a (or A) through f (or F). Hexadecimal digits a (or A) through f (or F) represent values in the range 10 through 15. For example:

int i = 0x3fff; // Hexadecimal constant
int j = 0X3FFF; // Equal to i

To specify an unsigned type, use either the u or U suffix. To specify a long type, use either the l or L suffix. For example:

unsigned uVal = 328u; // Unsigned value
long lVal = 0x7FFFFFL; // Long value specified
// as hex constant
unsigned long ulVal = 0776745ul; // Unsigned long value


gundamy 2010-05-07
  • 打赏
  • 举报
回复
2L正解
康斯坦汀 2010-05-07
  • 打赏
  • 举报
回复
2L是对的,应该是文本文件的换行和文件结束符
向立天 2010-05-07
  • 打赏
  • 举报
回复
moon6623 2010-05-07
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 keiy 的回复:]
0x0A LF 表示换行
0x0D CR 表示回车
0x1A SUB 在文本文件中表示文件结果
[/Quote]

UP
wdl1127 2010-05-07
  • 打赏
  • 举报
回复
当然是表示16进制数了,晕,0xA-0xF表示十进制的10-15,0x1A=1*16+10=26
cj83111 2010-05-07
  • 打赏
  • 举报
回复
2L的是正解。
wzywsk 2010-05-07
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 keiy 的回复:]
0x0A LF 表示换行
0x0D CR 表示回车
0x1A SUB 在文本文件中表示文件结果
[/Quote]

正解
yanran_hill 2010-05-07
  • 打赏
  • 举报
回复
如果对应于ASCII码,分别是
回车符,换行符,CTRL+Z
Mg 2010-05-06
  • 打赏
  • 举报
回复
0x0D,0x0A,0x1A这是16进制的表示,A = 10,进位为16的幂,所以分别为上面所说的13,10,26
wibnmo 2010-05-06
  • 打赏
  • 举报
回复
学习。。
lovesi3344 2010-05-06
  • 打赏
  • 举报
回复
OX开头代表十六进制

A 是10
B 11
C 12
D 13
E 14
F 15

0x0D,0x0A,0x1A
13 10 31 (00011111)
柯本 2010-05-06
  • 打赏
  • 举报
回复
0x0A LF 表示换行
0x0D CR 表示回车
0x1A SUB 在文本文件中表示文件结果
kongbai308416350 2010-05-06
  • 打赏
  • 举报
回复
分别指的十进制的 13 10 26.........

69,830

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧