C ³ÌÐòÎÊÌâ (¶þ) - C/C++ / CÓïÑÔ
ÎÊһϣº
#include <stdio.h>
int main()
{
char x, y, z;
int i;
int a[16];
for(i=0; i<=16; i++)
{
a[i] = 0;
printf("%x %x \n", &a[i], &i);
}
return 0;
}
ÇëÎÊ£¬ÉÏÃæÕâ¶Î´úÂ룬Ϊʲô»áËÀÑ»·Êä³öµØÖ·°¡£¿
a[16]Ô½½ç£¬ÐÞ¸ÄÁËiµÄÖµ
ûÎÊÌâ°¡¡£code::block½á¹û£º
22ff20 22ff68
22ff24 22ff68
22ff28 22ff68
22ff2c 22ff68
22ff30 22ff68
22ff34 22ff68
22ff38 22ff68
22ff3c 22ff68
22ff40 22ff68
22ff44 22ff68
22ff48 22ff68
22ff4c 22ff68
22ff50 22ff68
22ff54 22ff68
22ff58 22ff68
22ff5c 22ff68
22ff60 22ff68
Process returned 0 (0x0) execution time : 0.297 s
Press any key to continue.
a[16]Ô½½ç¿ÉÄܳöÏÖËÀÑ»·Ã´£¿
¹ØÓÚaºÍiµÄÄÚ´æ·ÖÅ䣬²»Í¬±àÒëÆ÷¿ÉÄÜÓв»Í¬µÄ´¦Àí£¬ËùÒÔÕâ¶Î´úÂë²»¼ûµÃÔÚËùÓл·¾³¶¼ÊÇËÀÑ»·¡£
µ«ÊÇ£¬Èç¹û³öÏÖÁËËÄÑ»·£¬ÔÒò¾ÍÓ¦¸ÃÊÇi=16µÄʱºòa[i]=0Ô½½ç½á¹û°ÑiÇå0¡£
°ÑforÀïÃæµÄi <=16¸Ä³Éi<16¾Í¿Ï¶¨²»»áÓÐËÀÑ»·ÁË¡£
Â¥Éϵģ¬Ñ§Ï°ÁË~
C/C++ code:
#include <stdio.h>
int main()
{
char x, y, z;
int i;
int a[16];
for(i=0; i <=15; i++)
{
Ïà¹ØÎÊ´ð£º
13¸öÈËΧ³ÉһȦ£¬´ÓµÚÒ»¸öÈË¿ªÊ¼Ë³Ðò±¨ºÅ1£¬2£¬3¡£·²±¨µ½3ÕßÍ˳öȦ×Ó£¬ÕÒ³ö×îºóÁôÔÚȦ×ÓÖеÄÈËÔÀ´µÄÐòºÅ
½á¹ûÓ¦¸ÃÊÇ13 ¿ÉÎҵijÌÐòµÄ½á¹ûÊÇ11 Ï£ÍûºÃÐÄÈË°ï¸ÄÒ»ÏÂ
#include <stdio.h>
#include < ......
ÎÒÓÃPHPÀ©Õ¹Cʱ£¬ÓõÄÊÇÔ´ÂëextĿ¼ÏµÄ./ext_skel
×îºó±àÒë×ÜÊDz»ÄÜÉú³ÉÀ©Õ¹Ä£¿éµÄ.so¶¯Ì¬¿â£¬ÎÒÓõİ汾ÊÇ5.3.0£¬
ÕâÊÇÔõô»ØÊ£¬¸ßÊÖ½â´ðÏÂ
²»ÄÜÉú³ÉʱÓÐɶÌáʾÐÅÏ¢£¿
ÔËÐÐÁË/ext_skel --extname=Ä ......
C\C++ÈçºÎ¼ÆË㺯ÊýµÄµ¼Êý,±¾ÈËÐÂÊÖ£¬Ïëд¸ö³ÌÐò£¬µ«ÊDz»ÖªµÀÈçºÎÏÂÊÖ£¬»¹Íû¸ßÊÖÖ¸µãÒ»¶þ£¬Ð»¹ý¡£
Õâ¸ö¡¡
¸úº¯ÊýµÄ¾ßÌåÐÎʽÓйذɣ¬ÄѵÀÄãÏë±à³ö¸ö¡°ÍòÄÜ¡±µÄÇ󵼺¯Êý£¿
°³ÉÏѧʱÏë¹ý×Ô¶¯ÍƵ¼¹«Ê½£¬ºóÀ´ ......
ÓÉÓÚ¹«Ë¾·¢Õ¹ÐèÒª£¬ÔÚ´ËÕæ³ÏÑ°ÕÒ¿ª·¢ÈËÔ±£¬ÒªÇóÈçÏ£º
¸ÚλְÔð£º
1¡¢ºËÐÄ´úÂë±àд£»
2¡¢È·±£Èí¼þ²úÆ·µÄÖÊÁ¿£»
¸ÚλҪÇó£º
1¡¢ÊìϤC¼°C++³ÌÐòÉè¼Æ£¬ÊìϤ»ã±àÓïÑÔ,ÊìϤC/C++±ê×¼¿â¡£
......