問題詳情

30)有以下程序#includemain(){intn,*p=NULL;*p=&n;printf(“Inputn:”);scanf(“%d”,&p);printf(“outputn:”);printf(“%d”,p);}该程序试图通过指针p为变量n读入数据并输出,但程序有多处错误,以下语句正确的是
(A)intn,*p=NULL;
(B)*p=&n;
(C)scanf(“%d”,&p)
(D)printf(“%d”,p);

參考答案

答案:A
難度:適中0.5
統計:A(0),B(0),C(0),D(0),E(0)

內容推薦

內容推薦