Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»µÀC ÌâÄ¿

ÉùÃ÷ÁËÒ»¸öÕûÊýÊý×é  a[30]  , a µÄÄÚ´æµØַλÖÃΪ£º 240ff40 
ÇëÎÊ    a[10]  a[15] µÄÄÚ´æµØÖ·ÊÇʲô£¿£¿£¿

ÏêϸµÄ˵Ã÷ºÍ´ð°¸ ¡£¡£¡£ÎÒÊdzõѧÕß¡£¡£¡£ÔÚÏߵȡ£¡£¡£¡£
240ff40 + (10 * sizeof(int))
240ff40 + (15 * sizeof(int))
Ò»°ãµÄ32λϵͳ£¬sizeof(int)ÊÇ4£¬Ò²¾ÍÊÇ˵ÿ¸öÕûÊýÕ¼ÓÃ4×Ö½Ú£¬ÄÇô½á¹û¾ÍÊÇ
240ff40 + 40 = 240ff68
240ff40 + 60 = 240ff7c



¶¥Ò»¸ö

Æ«ÒÆÒ»¸öϱêÊÇ4×Ö½Ú£¬ÆäËûÄã×Ô¼ºËã°É

ÉùÃ÷ÁËÒ»¸öÕûÊýÊý×é  a[30]  , a µÄÄÚ´æµØַλÖÃΪ£º 240ff40 
ÇëÎÊ    a[10]  a[15] µÄÄÚ´æµØÖ·ÊÇʲô£¿£¿£¿
int *p_a1=NULL;
int *p_a2=NULL;
p_a1=a;
p_a1+=10*sizeof(int);
printf("&p_a1=%0x\n",p_a1);
p_a2=a;
p_a2+=15*sizeof(int);
printf("&p_a2=%0x\n",p_a2);

up

¶¥4Â¥£¬Åöµ½ÕâÑùµÄÎÊÌâÍêÈ«¿ÉÒÔ×Ô¼ºÐ´¸ö´úÂëÑо¿~

¶þÂ¥Õý½â

Äã¿ÉÒÔ±à¸ö³ÌÐò£º(ºÃ¾ÃûÓÐдCÁË£¬²»ÖªµÀ¶Ô²»¶Ô)
²»¹ýËûдµÃºÜ²»´í£¡£¡
C/C++ code:

#include<stdio.h>
int main()
{
//Ç°Ã涨ÒåÄãµÄa
int i;
int a[i];
for(i=0;i<30;i++)
{
printf("%ox",a[i]);

}
return 0;
}



ÒýÓÃ
ÉùÃ÷ÁËÒ»¸öÕûÊýÊý×é  a[30]  , a µÄÄÚ´æµØַλÖÃΪ£º 240ff40 


Ïà¹ØÎÊ´ð£º

ѧϰÌÖÂÛ C/C++ QQȺ - C/C++ / ·Ç¼¼ÊõÇø

QQȺ 29152388
ÓÑÇéUP

°ï¶¥

up

°ïup

up Ö§³Ö£¡

up jf

...ÄѵÀÓзÖ..?

up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£

Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ

¼ÓÁË¡£

¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......

cÊý¾ÝÀàÐÍÎÊÌ⣬¶®µÃÅóÓѽøÀ´¿´¿´£¬Ð»Ð»

ÓÃdev-c++±àÒëµÄ
ÊÇc primer plus µÄÀýÌâ
³ÌÐòÈçÏ£º
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    unsigned int un = 3000000000; /* 32λint ......

ÇëÎÊÎÒдµÄc³ÌÐòÔõôÓÐÕâô¶àµÄwarning£¿£¿

warningÓÐ8¸ö£¬µ«ÊDz»Öªµ½ÊÇÔõô»ØÊ£¬warning¾ßÌåÈçÏ£º
newNode1=(graph)malloc(sizeof(struct node));¶ÔÓ¦µÄΪ£º
incompatible implicit declaration of built-in function 'malloc'

int M= ......

delphiÖÐÈçºÎµ÷ÓÃCдµÄDLL£¬Çë´Í½Ì£¡



Òª¿ª·¢Ò»¸ö½ÓÊÕGPRS DTUÊý¾ÝµÄ¹ÜÀíÈí¼þ£¬DTU³§¼ÒÌṩÁ˶¯Ì¬Á´½Ó¿â¡£¿ÉÎÒ²»ÖªÈçºÎµ÷ÓÃËü£¬²éÁËһЩ×ÊÁÏҲûÕÒµ½Ã÷È·µÄ·½·¨£¬¼¸ÌìҲûÓнøÕ¹£¬ÓôÃÆÖÁ¼«¡£ÎÒ´ÓÖÐÑ¡È¡ÁËÒ»¸öº¯Êý£¬¿ÒÇëºÃÐĵÄÓо­ÑéµÄ´óÏÀ¸æËßÎÒ¸ ......

¹ÜµÀÖÐÊäÈëCtrl+CµÄÎÊÌâÇó½Ì

ÎÒÔÚ³ÌÐòÖÐÓÃCreatePipe´´½¨ÁËÒ»¸ö¹ÜµÀ£¬ÓÃËüºÍÃüÁîÐÐcmd.exeÀ´¹ØÁª¡£

ÏÖÔÚÎÒWriteFileÀ´Ïò¹ÜµÀдÈë ping 192.168.0.1 -t À´Æô¶¯ping²âÊÔ£¬ÇëÎÊÎÒÈçºÎÍ£Ö¹Õâ¸öping£¿ ÎÒÏëÏò¹ÜµÀÄÚд

Ctrl+CÀ´ÊµÏÖ£¬µ« ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ