问题标题:
C语言中ASCII码是什么意思?
问题描述:

C语言中ASCII码是什么意思?

乔小燕回答:
  是一个字符表,一个字节的范围是0-255,每个数可以表示一个字符.计算机都是以1,0编码的,可以先取得二进制对应的10进制,再解析为对应的字符.   但128-255基本上没有被定义,用于以后扩展.   例如;   字符'a',的ASCII是97.   你可以做个是实验   chartmp=97;   printf("%c,tmp);   在输出终端表示为a.   其他也一样.   以下是部分表   ASCIITable(7-bit)   (ASCII=AmericanStandardCodeforInformationInterchange)   DecimalOctalHexBinaryValue   --------------------------   00000000000000000NUL(Nullchar.)   00100100100000001SOH(StartofHeader)   00200200200000010STX(StartofText)   00300300300000011ETX(EndofText)   00400400400000100EOT(EndofTransmission)   00500500500000101ENQ(Enquiry)   00600600600000110ACK(Acknowledgment)   00700700700000111BEL(Bell)   00801000800001000BS(Backspace)   00901100900001001HT(HorizontalTab)   01001200A00001010LF(LineFeed)   01101300B00001011VT(VerticalTab)   01201400C00001100FF(FormFeed)   01301500D00001101CR(CarriageReturn)   01401600E00001110SO(ShiftOut)   01501700F00001111SI(ShiftIn)   01602001000010000DLE(DataLinkEscape)   01702101100010001DC1(XON)(DeviceControl1)   01802201200010010DC2(DeviceControl2)   01902301300010011DC3(XOFF)(DeviceControl3)   02002401400010100DC4(DeviceControl4)   02102501500010101NAK(NegativeAcknowledgement)   02202601600010110SYN(SynchronousIdle)   02302701700010111ETB(EndofTrans.Block)   02403001800011000CAN(Cancel)   02503101900011001EM(EndofMedium)   02603201A00011010SUB(Substitute)   02703301B00011011ESC(Escape)   02803401C00011100FS(FileSeparator)   02903501D00011101GS(GroupSeparator)   03003601E00011110RS(RequesttoSend)(RecordSeparator)   03103701F00011111US(UnitSeparator)   03204002000100000SP(Space)   03304102100100001!(exclamationmark)   03404202200100010"(doublequote)   03504302300100011#(numbersign)   03604402400100100$(dollarsign)   03704502500100101%(percent)   03804602600100110&(ampersand)   03904702700100111'(singlequote)   04005002800101000((left/openingparenthesis)   04105102900101001)(right/closingparenthesis)   04205202A00101010*(asterisk)   04305302B00101011+(plus)   04405402C00101100,(comma)   04505502D00101101-(minusordash)   04605602E00101110.(dot)   04705702F00101111/(forwardslash)   048060030001100000   049061031001100011   050062032001100102   051063033001100113   052064034001101004   053065035001101015   054066036001101106   055067037001101117   056070038001110008   057071039001110019   05807203A00111010:(colon)   05907303B00111011;(semi-colon)   06007403C00111100(greaterthan)   06307703F00111111?(questionmark)   06410004001000000@(ATsymbol)   06510104101000001A
查看更多
其它推荐
热门其它推荐