º¯ÊýÊÇ ÓÃlistdelete()·µ»Øe Èç¹ûtype *e²»¼ÓNULL ÔòÌáʾÏÈʹÓà ¼ÓÁ˺óΪʲôÔÚ½á¹ûºó»¹ÓÐÒ»¸öNULL pointer assignment ÔõôÈÃËü²»¾¯¸æ ½á¹ûÒ²²»ÏÔʾNULL pointer assignment£¿
void main(){
int i;
type *e=NULL;
listdelete£¨e);
printf("%d",*e);
}
listdeleteµÄʵÏÖÊDz»ÊÇ·ÖÅäÄÚ´æÁË£¬»¹ÊÇÌù³öÀ´¿´Ò»ÏÂ
ûÔõô¿´Ã÷°×
type ¾ÍÊÇËæ±ãÒ»¸öÀàÐÍ Èçint
listdelete£¨);¾ÍÊǸøeÒ»¸öÖµ ±ÈÈç
void listdelete(int *e)
{
scanf("%d",e);
}
ÊÔͼͨ¹ýlistdelete£¨e); ¸Ä±äeÊÇͽÀ͵Ä
¾ø¶ÔûÓÐʵÏֵĿÉÄÜ
printf("%d",*e);
¸Ä¸ÄÕâ¸ö%d ÊÔÊÔ¡£¸Ä³É%c£¬»òÕß±ðµÄ
Äã²»»á¾Í˵²»»á »¹Ã»¿ÉÄÜʵÏÖ ÎÒ´«µÝµÄµØÖ·Ôõô²»ÄÜʵÏÖ ·þÁË
#include <stdio.h>
void listdelete(int *);
int main(void)
{
int i;
int *e = &i;
listdelete(e);
printf("%d",*e);
return 0;
}
void listdelete(int *e)
{
scanf("%d",e);
return ;
}
ÕâÄêÍ·
Ïà¹ØÎÊ´ð£º
QQȺ 29152388
ÓÑÇéUP
°ï¶¥
up
°ïup
up Ö§³Ö£¡
up jf
...ÄѵÀÓзÖ..?
up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£
Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ
¼ÓÁË¡£
¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......
ÒÔǰÔÚVCÀïÃæ½¨Ò»¸ö¹¤³Ì£¬¶¼Ö»ÓÃÒ»¸ö .c Îļþ£¬×òÌìÔÚÒ»¸ö¹¤³ÌÀïÓÃÁËÁ½¸ö .cÎļþÁË£¬Óöµ½ÎÊÌâÁË£¬Çë´ó¼ÒÖ¸µã¡£±ÈÈ磺
File1.c Fil ......
ÈçºÎÓÃcʵÏÖ×Ô¶¯µÄtelnet¹¦ÄÜ,ÓÐËÖªµÀÔõôÓÃcÓïÑÔÀ´ÊµÏÖ¡£ÎÊÌâÖ÷ÒªÊÇtelnetµÄÓû§Ãû£¬ÃÜÂëÒª½»»¥Ê½µÄÊäÈ룬ÔõôÄܹ»ÓóÌÐòʵÏÖ°¡£¬¸ßÊÖÖ¸½Ì°¡
ÎÒÓÐÔ´Âë ÄãÒªµÄ»° ÁôÏÂÓÊÏä
flynecnt@qq.com ллÁË
liuzhizu1 ......
C/C++ code:
void p1(const char **pname)
{
const char *name = "test1";
*pname = name;
}
void p2(const char **pname)
{
char *name = "test2";
*pname = name ......