ÓÑÇéÌáʾ£ºÈç¹û±¾ÍøÒ³´ò¿ªÌ«Âý»òÏÔʾ²»ÍêÕû£¬Çë³¢ÊÔÊó±êÓÒ¼ü¡°Ë¢Ð¡±±¾ÍøÒ³£¡ÔĶÁ¹ý³Ì·¢ÏÖÈκδíÎóÇë¸æËßÎÒÃÇ£¬Ð»Ð»£¡£¡ ±¨¸æ´íÎó
ÈÙÒ«µç×ÓÊé ·µ»Ø±¾ÊéĿ¼ ÎÒµÄÊé¼Ü ÎÒµÄÊéÇ© TXTÈ«±¾ÏÂÔØ ½øÈëÊé°É ¼ÓÈëÊéÇ©

[Ãâ·ÑÏÂÔØ cÓïÑÔÉî¶È½âÆÊ[1]-µÚÕÂ

°´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³£¬°´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ£¬°´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿£¡
¡ª¡ª¡ª¡ªÎ´ÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡





£û¡¡


//code¡¡


£ý¡¡


C¡£hÎļþÖж¨Ò壺¡¡
D¡£cÎļþÖÐÓá¡
externÐÞÊΣº¡¡
int¡¡
j¡¡
=1£»¡¡
externdoublej£»//ÕâÑùÐÐÂð£¿ÎªÊ²Ã´£¿¡¡


int¡¡
k¡¡
=2£»¡¡
j=3¡£0£»//ÕâÑùÐÐÂð£¿ÎªÊ²Ã´£¿

ÖÁÓÚ¡¡
extern¡°C¡±µÄÓ÷¨£¬Ò»°ãÈÏΪÊôÓÚ¡¡
C£«£«µÄ·¶³ë£¬ÕâÀï¾ÍÏȲ»ÌÖÂÛ¡£µ±È»¹ØÓÚ¡¡
extern
µÄÌÖÂÛ»¹Ô¶Ã»ÓнáÊø£¬ÔÚÖ¸ÕëÓëÊý×éÄÇÒ»Õ£¬Ä㻹»áºÍËüÇ×ÃܽӴ¥µÄ¡£

1¡£14£¬struct¹Ø¼ü×Ö¡¡
structÊǸöÉñÆæµÄ¹Ø¼ü×Ö£¬Ëü½«Ò»Ð©Ïà¹ØÁªµÄÊý¾Ý´ò°ü³ÉÒ»¸öÕûÌ壬·½±ãʹÓá£

ÔÚÍøÂçЭÒ顢ͨÐÅ¿ØÖÆ¡¢Ç¶Èëʽϵͳ¡¢Çý¶¯¿ª·¢µÈµØ·½£¬ÎÒÃǾ­³£Òª´«Ë͵IJ»ÊǼòµ¥
µÄ×Ö½ÚÁ÷£¨charÐÍÊý×飩£¬¶øÊǶàÖÖÊý¾Ý×éºÏÆðÀ´µÄÒ»¸öÕûÌ壬Æä±íÏÖÐÎʽÊÇÒ»¸ö½á¹¹Ìå¡£
¾­Ñé²»×ãµÄ¿ª·¢ÈËÔ±ÍùÍù½«ËùÓÐÐèÒª´«Ë͵ÄÄÚÈÝÒÀ˳Ðò±£´æÔÚ¡¡
charÐÍÊý×éÖУ¬Í¨¹ýÖ¸ÕëÆ«
ÒƵķ½·¨´«ËÍÍøÂ籨ÎĵÈÐÅÏ¢¡£ÕâÑù×ö±à³Ì¸´ÔÓ£¬Ò׳ö´í£¬¶øÇÒÒ»µ©¿ØÖÆ·½Ê½¼°Í¨ÐÅЭÒé
ÓÐËù±ä»¯£¬³ÌÐò¾ÍÒª½øÐзdz£Ï¸ÖµÄÐ޸ģ¬·Ç³£ÈÝÒ׳ö´í¡£Õâ¸öʱºòÖ»ÐèÒªÒ»¸ö½á¹¹Ìå¾Í
Äܸ㶨¡£Æ½Ê±ÎÒÃÇÒªÇóº¯ÊýµÄ²ÎÊý¾¡Á¿²»¶àÓÚ¡¡
4¸ö£¬Èç¹ûº¯ÊýµÄ²ÎÊý¶àÓÚ¡¡
4¸öʹÓÃÆðÀ´·Ç
³£ÈÝÒ׳ö´í£¨°üÀ¨Ã¿¸ö²ÎÊýµÄÒâÒåºÍ˳Ðò¶¼ÈÝÒ×Ū´í£©£¬Ð§ÂÊÒ²»á½µµÍ£¨Óë¾ßÌå¡¡
CPUÓйأ¬¡¡
ARM
оƬ¶ÔÓÚ³¬¹ý¡¡
4¸ö²ÎÊýµÄ´¦Àí¾ÍÓн²¾¿£¬¾ßÌåÇë²Î¿¼Ïà¹Ø×ÊÁÏ£©¡£Õâ¸öʱºò£¬¿ÉÒÔÓýṹÌå
ѹËõ²ÎÊý¸öÊý¡£

1¡£14¡£1£¬¿Õ½á¹¹Ìå¶à´ó£¿
½á¹¹ÌåËùÕ¼µÄÄÚ´æ´óСÊÇÆä³ÉÔ±ËùÕ¼ÄÚ´æÖ®ºÍ£¨¹ØÓڽṹÌåµÄÄÚ´æ¶ÔÆ룬Çë²Î¿¼Ô¤´¦
ÀíÄÇÕ£©¡£ÕâµãºÜÈÝÒ×Àí½â£¬µ«ÊÇÏÂÃæµÄÕâÖÖÇé¿öÄØ£¿


structstudent¡¡


£û¡¡


£ýstu£»¡¡


sizeof£¨stu£©µÄÖµÊǶàÉÙÄØ£¿ÔÚ¡¡
VisualC£«£«¡¡
6¡£0ÉϲâÊÔһϡ£

ºÜÒź¶£¬²»ÊÇ¡¡
0£¬¶øÊÇ¡¡
1¡£ÎªÊ²Ã´ÄØ£¿ÄãÏëÏ룬Èç¹ûÎÒÃÇ°Ñ¡¡
structstudent¿´³ÉÒ»¸öÄ£×Ó
µÄ»°£¬ÄãÄÜÔì³öÒ»¸öûÓÐÈκÎÈÝ»ýµÄÄ£×ÓÂð£¿ÏÔÈ»²»ÐС£±àÒëÆ÷Ò²ÊÇÈç´ËÈÏΪ¡£±àÒëÆ÷ÈÏ
ΪÈκÎÒ»ÖÖÊý¾ÝÀàÐͶ¼ÓÐÆä´óС£¬ÓÃËüÀ´¶¨ÒåÒ»¸ö±äÁ¿Äܹ»·ÖÅäÈ·¶¨´óСµÄ¿Õ¼ä¡£¼ÈÈ»Èç
´Ë£¬±àÒëÆ÷¾ÍÀíËùµ±È»µÄÈÏΪÈκÎÒ»¸ö½á¹¹Ì嶼ÊÇÓдóСµÄ£¬ÄÄÅÂÕâ¸ö½á¹¹ÌåΪ¿Õ¡£ÄÇÍò
Ò»½á¹¹ÌåÕæµÄΪ¿Õ£¬ËüµÄ´óСΪʲôֵ±È½ÏºÏÊÊÄØ£¿¼ÙÉè½á¹¹ÌåÄÚÖ»ÓÐÒ»¸ö¡¡
charÐ͵ÄÊý¾Ý
³ÉÔ±£¬ÄÇÆä´óСΪ¡¡
1byte£¨ÕâÀïÏȲ»¿¼ÂÇÄÚ´æ¶ÔÆëµÄÇé¿ö£©¡£Ò²¾ÍÊÇ˵·Ç¿Õ½á¹¹ÌåÀàÐÍÊý¾Ý×î
ÉÙÐèÒªÕ¼Ò»¸ö×ֽڵĿռ䣬¶ø¿Õ½á¹¹ÌåÀàÐÍÊý¾Ý×ܲ»ÄܱÈ×îСµÄ·Ç¿Õ½á¹¹ÌåÀàÐÍÊý¾ÝËùÕ¼
µÄ¿Õ¼ä´ó°É¡£Õâ¾ÍÂé·³ÁË£¬¿Õ½á¹¹ÌåµÄ´óС¼È²»ÄÜΪ¡¡
0£¬Ò²²»ÄÜ´óÓÚ¡¡
1£¬Ôõô°ì£¿¶¨ÒåΪ¡¡
0¡£5
¸ö¡¡
byte£¿µ«ÊÇÄÚ´æµØÖ·µÄ×îСµ¥Î»ÊÇ¡¡
1¸ö¡¡
byte£¬0¡£5¸ö¡¡
byteÔõô´¦Àí£¿½â¾öÕâ¸öÎÊÌâµÄ×îºÃ
°ì·¨¾ÍÊÇÕÛÖУ¬±àÒëÆ÷ÀíËùµ±È»µÄÈÏΪÄã¹¹ÔìÒ»¸ö½á¹¹ÌåÊý¾ÝÀàÐÍÊÇÓÃÀ´´ò°üһЩÊý¾Ý³É
Ô±µÄ£¬¶ø×îСµÄÊý¾Ý³ÉÔ±ÐèÒª¡¡
1¸ö¡¡
byte£¬±àÒëÆ÷Ϊÿ¸ö½á¹¹ÌåÀàÐÍÊý¾ÝÖÁÉÙÔ¤Áô¡¡
1¸ö¡¡
byte
µÄ¿Õ¼ä¡£ËùÒÔ£¬¿Õ½á¹¹ÌåµÄ´óС¾Í¶¨Î»¡¡
1¸ö¡¡
byte¡£

1¡£14¡£2£¬ÈáÐÔÊý×é
Ò²ÐíÄã´ÓÀ´Ã»ÓÐÌý˵¹ýÈáÐÔÊý×飨flexiblearray£©Õâ¸ö¸ÅÄµ«ÊÇËüȷʵÊÇ´æÔڵġ£¡¡


C99ÖУ¬½á¹¹ÖеÄ×îºóÒ»¸öÔªËØÔÊÐíÊÇδ֪´óСµÄÊý×飬Õâ¾Í½Ð×öÈáÐÔÊý×é³ÉÔ±£¬µ«½á
¹¹ÖеÄÈáÐÔÊý×é³ÉԱǰÃæ±ØÐëÖÁÉÙÒ»¸öÆäËû³ÉÔ±¡£ÈáÐÔÊý×é³ÉÔ±ÔÊÐí½á¹¹Öаüº¬Ò»¸ö´óС¿É
±äµÄÊý×é¡£sizeof·µ»ØµÄÕâÖֽṹ´óС²»°üÀ¨ÈáÐÔÊý×éµÄÄÚ´æ¡£°üº¬ÈáÐÔÊý×é³ÉÔ±µÄ½á¹¹Óá¡
malloc£¨£©º¯Êý½øÐÐÄÚ´æµÄ¶¯Ì¬·ÖÅ䣬²¢ÇÒ·ÖÅäµÄÄÚ´æÓ¦¸Ã´óÓڽṹµÄ´óС£¬ÒÔÊÊÓ¦ÈáÐÔÊý×é
µÄÔ¤ÆÚ´óС¡£

ÈáÐÔÊý×éµ½µ×ÈçºÎʹÓÃÄØ£¿¿´ÏÂÃæÀý×Ó£º¡¡


typedefstructst_type¡¡


£û¡¡


inti£»¡¡


inta£§0£§£»¡¡


£ýtype_a£»

ÓÐЩ±àÒëÆ÷»á±¨´íÎÞ·¨±àÒë¿ÉÒԸijɣº¡¡


typedef¡¡
structst_type¡¡


£û¡¡


inti£»¡¡


inta£§£§£»¡¡


£ýtype_a£»
ÕâÑùÎÒÃǾͿÉÒÔ¶¨ÒåÒ»¸ö¿É±ä³¤µÄ½á¹¹Ì壬Óá¡
sizeof£¨type_a£©µÃµ½µÄÖ»ÓС¡
4£¬¾ÍÊÇ¡¡
sizeof£¨i£©=sizeof£¨int£©¡£ÄǸö¡¡
0¸öÔªËصÄÊý×éûÓÐÕ¼Óÿռ䣬¶øºóÎÒÃÇ¿ÉÒÔ½øÐб䳤²Ù×÷ÁË¡£Í¨
¹ýÈçϱí´ïʽ¸ø½á¹¹Ìå·ÖÅäÄڴ棺¡¡


type_a¡¡
*p¡¡
=£¨type_a*£©malloc£¨sizeof£¨type_a£©£«100*sizeof£¨int£©£©£»¡¡



ÕâÑùÎÒÃÇΪ½á¹¹ÌåÖ¸Õë¡¡
p·ÖÅäÁËÒ»¿éÄÚ´æ¡£Óá¡
p¡­¡·item£§n£§¾ÍÄܼòµ¥µØ·ÃÎʿɱ䳤ԪËØ¡£
µ«ÊÇÕâʱºòÎÒÃÇÔÙÓá¡
sizeof£¨*p£©²âÊԽṹÌåµÄ´óС£¬·¢ÏÖÈÔȻΪ¡¡
4¡£ÊDz»ÊǺܹîÒ죿ÎÒÃÇ
²»ÊǸøÕâ¸öÊý×é·ÖÅäÁË¿Õ¼äô£¿

±ð¼±£¬ÏÈ»ØÒäÒ»ÏÂÎÒÃÇÇ°Ãæ½²¹ýµÄ¡°Ä£×Ó¡±¡£ÔÚ¶¨ÒåÕâ¸ö½á¹¹ÌåµÄʱºò£¬Ä£×ӵĴóС¾Í
ÒѾ­È·¶¨²»°üº¬ÈáÐÔÊý×éµÄÄÚ´æ´óС¡£ÈáÐÔÊý×éÖ»ÊDZàÍâÈËÔ±£¬²»Õ¼½á¹¹ÌåµÄ±àÖÆ¡£Ö»ÊÇ˵
ÔÚʹÓÃÈáÐÔÊý×éʱÐèÒª°ÑËüµ±×÷½á¹¹ÌåµÄÒ»¸ö³ÉÔ±£¬½ö´Ë¶øÒÑ¡£ÔÙ˵°×µã£¬ÈáÐÔÊý×éÆäʵÓë
½á¹¹Ìåûʲô¹Øϵ£¬Ö»ÊÇ¡°¹ÒÑòÍ·Âô¹·È⡱¶øÒÑ£¬Ëã²»µÃ½á¹¹ÌåµÄÕýʽ³ÉÔ±¡£

ÐèҪ˵Ã÷µÄÊÇ£ºC89²»Ö§³ÖÕâÖÖ¶«Î÷£¬C99°ÑËü×÷ΪһÖÖÌØÀý¼ÓÈëÁ˱ê×¼¡£µ«ÊÇ£¬¡¡
C99
ËùÖ§³ÖµÄÊÇ¡¡
inpletetype£¬¶ø²»ÊÇ¡¡
zeroarray£¬ÐÎͬ¡¡
intitem£§0£§£»ÕâÖÖÐÎʽÊÇ·Ç·¨µÄ£¬C99Ö§
³ÖµÄÐÎʽÊÇÐÎͬ¡¡
intitem£§£§£»Ö»²»¹ýÓÐЩ±àÒëÆ÷°Ñ¡¡
intitem£§0£§£»×÷Ϊ·Ç±ê×¼À©Õ¹À´Ö§³Ö£¬¶øÇÒÔÚ¡¡
C99·¢²¼Ö®Ç°ÒѾ­ÓÐÁËÕâÖַDZê×¼À©Õ¹ÁË£¬C99·¢²¼Ö®ºó£¬ÓÐЩ±àÒëÆ÷°ÑÁ½Õߺ϶øΪһÁË¡£

µ±È»£¬ÉÏÃæ¼ÈÈ»Óá¡
mallocº¯Êý·ÖÅäÁËÄڴ棬¿Ï¶¨¾ÍÐèÒªÓá¡
freeº¯ÊýÀ´ÊÍ·ÅÄڴ棺¡¡


free£¨p£©£»

¾­¹ýÉÏÃæµÄ½²½â£¬ÏàÐÅÄãÒѾ­ÕÆÎÕÁËÕâ¸ö¿´ÆðÀ´ËƺõºÜÉñÃصĶ«Î÷¡£²»¹ýʵÔÚÒªÊÇû
ÕÆÎÕÒ²ÎÞËùν£¬Õâ¸ö¶«Î÷ʵÔÚºÜÉÙÓá£

1¡£14¡£3£¬structÓë¡¡
classµÄÇø±ð
ÔÚ¡¡
C£«£«Àï¡¡
struct¹Ø¼ü×ÖÓë¡¡
class¹Ø¼ü×ÖÒ»°ã¿ÉÒÔͨÓã¬Ö»ÓÐÒ»¸öºÜСµÄÇø±ð¡£¡¡
structµÄ³É
ԱĬÈÏÇé¿öÏÂÊôÐÔÊÇ¡¡
publicµÄ£¬¶ø¡¡
class³ÉԱȴÊÇ¡¡
privateµÄ¡£ºÜ¶àÈ˾õµÃ²»ºÃ¼Ç£¬ÆäʵºÜÈÝ
Òס£ÄãƽʱÓýṹÌåʱÓá¡
publicÐÞÊÎËüµÄ³ÉÔ±ÁËÂ𣿼ÈÈ»¡¡
struct¹Ø¼ü×ÖÓë¡¡
class¹Ø¼ü×Ö¿ÉÒÔ
ͨÓã¬ÄãÒ²²»ÒªÈÏΪ½á¹¹ÌåÄÚ²»Äܷź¯ÊýÁË¡£

µ±È»£¬¹ØÓڽṹÌåµÄÌÖÂÛԶûÓнáÊø£¬ÔÚÖ¸ÕëÓëÊý×éÄÇÒ»Õ£¬Ä㻹»áÒªºÍËü´ò½»µÀµÄ¡£

1¡£15£¬union¹Ø¼ü×Ö¡¡
union¹Ø¼ü×ÖµÄÓ÷¨Óë¡¡
structµÄÓ÷¨·Ç³£ÀàËÆ¡£¡¡


unionά»¤×ã¹»µÄ¿Õ¼äÀ´Ö÷Ŷà¸öÊý¾Ý³ÉÔ±Öеġ°Ò»ÖÖ¡±£¬¶ø²»ÊÇΪÿһ¸öÊý¾Ý³ÉÔ±ÅäÖÃ
¿Õ¼ä£¬ÔÚ¡¡
unionÖÐËùÓеÄÊý¾Ý³ÉÔ±¹²ÓÃÒ»¸ö¿Õ¼ä£¬Í¬Ò»Ê±¼äÖ»ÄÜ´¢´æÆäÖÐÒ»¸öÊý¾Ý³ÉÔ±£¬Ëù
ÓеÄÊý¾Ý³ÉÔ±¾ßÓÐÏàͬµÄÆðʼµØÖ·¡£Àý×ÓÈçÏ£º¡¡


unionStateMachine¡¡


£û¡¡
charcharacter£»¡¡
intnumber£»¡¡
char¡¡
*str£»¡¡
doubleexp£»¡¡


£ý£»
Ò»¸ö¡¡
unionÖ»ÅäÖÃÒ»¸ö×ã¹»´óµÄ¿Õ¼äÒÔÀ´ÈÝÄÉ×î´ó³¤¶ÈµÄÊý¾Ý³ÉÔ±£¬ÒÔÉÏÀý¶øÑÔ£¬×î´ó
³¤¶ÈÊÇ¡¡
doubleÐÍ̬£¬ËùÒÔ¡¡
StateMachineµÄ¿Õ¼ä´óС¾ÍÊÇ¡¡
doubleÊý¾ÝÀàÐ͵ĴóС¡£

ÔÚ¡¡
C£«£«ÀunionµÄ³ÉԱĬÈÏÊôÐÔҳΪ¡¡
public¡£unionÖ÷ÒªÓÃÀ´Ñ¹Ëõ¿Õ¼ä¡£Èç¹ûһЩÊý¾Ý


²»¿ÉÄÜÔÚͬһʱ¼äͬʱ±»Óõ½£¬Ôò¿ÉÒÔʹÓá¡
union¡£

1¡£15¡£1£¬´óС¶Ëģʽ¶Ô¡¡
unionÀàÐÍÊý¾ÝµÄÓ°Ïì
ÏÂÃæÔÙ¿´Ò»¸öÀý×Ó£º¡¡


union¡¡


£û¡¡
inti£»¡¡
char¡¡
a£§2£§£»¡¡


£ý*p£»u£»¡¡


p=&u£»¡¡
p¡­¡·a£§0£§¡¡
=¡¡
0x39£»¡¡
p¡­¡·a£§1£§¡¡
=0x38£»¡¡


p¡£iµÄÖµÓ¦¸ÃΪ¶àÉÙÄØ£¿
ÕâÀïÐèÒª¿¼ÂǴ洢ģʽ£º´ó¶ËģʽºÍС¶Ëģʽ¡£
´ó¶Ëģʽ£¨¡¡
Big_endian£©£º×ÖÊý¾ÝµÄ¸ß×Ö½Ú´æ´¢Ôڵ͵ØÖ·ÖУ¬¶ø×ÖÊý¾ÝµÄµÍ×Ö½ÚÔò´æ·Å
ÔڸߵØÖ·ÖС£
С¶Ëģʽ£¨¡¡
Little_endian£©£º×ÖÊý¾ÝµÄ¸ß×Ö½Ú´æ´¢ÔڸߵØÖ·ÖУ¬¶ø×ÖÊý¾ÝµÄµÍ×Ö½ÚÔò´æ·Å
Ôڵ͵ØÖ·ÖС£¡¡


unionÐÍÊý¾ÝËùÕ¼µÄ¿Õ¼äµÈÓÚÆä×î´óµÄ³ÉÔ±ËùÕ¼µÄ¿Õ¼ä¡£¶Ô¡¡
unionÐ͵ijÉÔ±µÄ´æÈ¡¶¼ÊÇ
Ïà¶ÔÓÚ¸ÃÁªºÏÌå»ùµØÖ·µÄÆ«ÒÆÁ¿Îª¡¡
0´¦¿ªÊ¼£¬Ò²¾ÍÊÇÁªºÏÌåµÄ·ÃÎʲ»ÂÛ¶ÔÄĸö±äÁ¿µÄ´æÈ¡¶¼
ÊÇ´Ó¡¡
unionµÄÊ×µØַλÖÿªÊ¼¡£Èç´ËÒ»½âÊÍ£¬ÉÏÃæµÄÎÊÌâÊÇ·ñÒѾ­ÓÐÁË´ð°¸ÄØ£¿

1¡£15¡£2£¬ÈçºÎÓóÌÐòÈ·Èϵ±Ç°ÏµÍ³µÄ´æ´¢Ä£Ê½£¿
ÉÏÊöÎÊÌâËƺõ»¹±È½Ï¼òµ¥£¬ÄÇÀ´¸öÓм¼Êõº¬Á¿µÄ£ºÇëдһ¸ö¡¡
Cº¯Êý£¬Èô´¦ÀíÆ÷ÊÇ¡¡


Big_endianµÄ£¬Ôò·µ»Ø¡¡
0£»ÈôÊÇ¡¡
Little_endianµÄ£¬Ôò·µ»Ø¡¡
1¡£
ÏÈ·ÖÎöһϣ¬°´ÕÕÉÏÃæ¹ØÓÚ´óС¶ËģʽµÄ¶¨Ò壬¼ÙÉè¡¡
intÀàÐͱäÁ¿¡¡
i±»³õʼ»¯Îª¡¡
1¡£
ÒÔ´ó¶Ëģʽ´æ´¢£¬ÆäÄÚ´æ²¼¾ÖÈçÏÂͼ£º


ÒÔС¶Ëģʽ´æ´¢£¬ÆäÄÚ´æ²¼¾ÖÈçÏÂͼ£º


±äÁ¿¡¡
iÕ¼¡¡
4¸ö×Ö½Ú£¬µ«Ö»ÓÐÒ»¸ö×Ö½ÚµÄֵΪ¡¡
1£¬ÁíÍâÈý¸ö×Ö½ÚµÄÖµ¶¼Îª¡¡
0¡£Èç¹ûÈ¡³öµÍ
µØÖ·ÉϵÄֵΪ¡¡
0£¬ºÁÎÞÒÉÎÊ£¬ÕâÊÇ´ó¶Ëģʽ£»Èç¹ûÈ¡³öµÍµØÖ·ÉϵÄֵΪ¡¡
1£¬ºÁÎÞÒÉÎÊ£¬ÕâÊÇ
С¶Ëģʽ¡£¼ÈÈ»Èç´Ë£¬ÎÒÃÇÍêÈ«¿ÉÒÔÀûÓá¡
unionÀàÐÍÊý¾ÝµÄÌص㣺ËùÓгÉÔ±µÄÆðʼµØÖ·Ò»Ö¡£
µ½ÏÖÔÚ£¬Ó¦¸ÃÖªµÀÔõôдÁË°É£¿²Î¿¼´ð°¸ÈçÏ£º¡¡


intcheckSystem£¨¡¡
£©¡¡


£û¡¡


unioncheck¡¡


£û¡¡


int¡¡
i£»¡¡


char¡¡
ch£»¡¡


£ýc£»¡¡


c¡£i¡¡
=1£»¡¡
return£¨c¡£ch¡¡
1£©£»¡¡
£ý


ÏÖÔÚÄã¿ÉÒÔÓÃÕâ¸öº¯ÊýÀ´²âÊÔÄ㵱ǰϵͳµÄ´æ´¢Ä£Ê½ÁË¡£µ±È»ÄãÒ²¿ÉÒÔ²»Óú¯Êý¶øÖ±
½ÓÈ¥²é¿´ÄÚ´æÀ´È·¶¨µ±Ç°ÏµÍ³µÄ´æ´¢Ä£Ê½¡£ÈçÏÂͼ£º


ͼÖС¡
0x01µÄÖµ´æÔڵ͵ØÖ·ÉÏ£¬ËµÃ÷µ±Ç°ÏµÍ³ÎªÐ¡¶Ëģʽ¡£
²»¹ýҪ˵Ã÷µÄÒ»µãÊÇ£¬Ä³Ð©ÏµÍ³¿ÉÄÜͬʱ֧³ÖÕâÁ½Öִ洢ģʽ£¬Äã¿ÉÒÔÓÃÓ²¼þÌøÏß»ò
ÔÚ±àÒëÆ÷µÄÑ¡ÏîÖÐÉèÖÃÆä´æ´¢Ä£Ê½¡£
Áô¸öÎÊÌ⣺

ÔÚ¡¡
x86ϵͳÏ£
·µ»ØĿ¼ ÉÏÒ»Ò³ ÏÂÒ»Ò³ »Øµ½¶¥²¿ ÔÞ£¨0£© ²È£¨0£©
δÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡
ÎÂÜ°Ìáʾ£º ο´Ð¡ËµµÄͬʱ·¢±íÆÀÂÛ£¬Ëµ³ö×Ô¼ºµÄ¿´·¨ºÍÆäËüС»ï°éÃÇ·ÖÏíÒ²²»´íŶ£¡·¢±íÊéÆÀ»¹¿ÉÒÔ»ñµÃ»ý·ÖºÍ¾­Ñé½±Àø£¬ÈÏÕæдԭ´´ÊéÆÀ ±»²ÉÄÉΪ¾«ÆÀ¿ÉÒÔ»ñµÃ´óÁ¿½ð±Ò¡¢»ý·ÖºÍ¾­Ñé½±ÀøŶ£¡