程序输入9,则输出结果是。
#include
intmain(void)
{inta=1,*p;
p=&a;
scanf("%d",&a);
printf("a=%d,*p=%d,",a,*p);
++(*p);
printf("a=%d,*p=%d\n",a,*p);
return0;
}
#include
intmain(void)
{inta=1,*p;
p=&a;
scanf("%d",&a);
printf("a=%d,*p=%d,",a,*p);
++(*p);
printf("a=%d,*p=%d\n",a,*p);
return0;
}
举一反三
- 程序运行结果是。 # include int main (void) { int a = 1, *p; p = &a; printf ("a=%d,*p=%d,", a, *p); *p = 3; printf("a=%d,*p=%d", a, *p); return 0; }
- 09110072:以下程序执行后的输出结果是()。intmain(){inta[]={1,2,3,4},y,*p=a[1];y=(*--p)++;printf(%d,y);return0;}
- 以下程序运行后的输出结果是#include<stdio.h>intmain(){inta[3][3],*p,i;p=&a[0][0];for(i=0;i<9;i++){p[i]=i+1;}printf("%d\n",a[1][2]);return0;}? 9|3|2|6
- 【单选题】#include<stdio.h>intmain(){inta[3][3],*p,i;p=&a[0][0];for(i=0;i<9;i++){p[i]=i+1;}printf("%d ",a[1][2]);return0;} A. 6 B. 3 C. 9 D. 2
- 以下程序段的运行结果是()。inta[2],*p=a;*p=2;p++;*p=5;printf("%d,",*p);p--;printf("%d\n",*p);