有以下程序:#inlucde<stdio.h>main()D)2 3 3{int n *P=NULL;*p=&n;printf(input n:);scanf(\%d
程序,指针,变量
已帮助 人
有以下程序: #inlucde<stdio.h> main()D)2 3 3 {int n,*P=NULL; *p=&n; printf("input n:");scanf("%d",&p);printf("output n:");printf("%d\n",p); } 该程序试图通过指针P为变量n读入数据并输出,但程序有多处错误,以下语句正确的是()。
A.int n,*P=NULL;
B.*P=&n;
C.scanf(“%d",&p)
D.printf("%d\n",p);
请帮忙给出正确答案和分析,谢谢!
