网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有下列程序段,程序段运行后的输出结果是10()。 int *p,n; n=10; p=&n; n=*p+10; printf("%dn", *p);


参考答案和解析
a=10 b=50 c=10
更多 “有下列程序段,程序段运行后的输出结果是10()。 int *p,n; n=10; p=n; n=*p+10; printf("%dn", *p);” 相关考题
考题 有以下程序#include stdio.hmain( ){ 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);

考题 有以下程序#include stdio.h#include stdlib.hint fun(int n){ int *p;p=(int*)malloc(sizeof(int));*p=n; return *p;}main(){ int a;a = fun(10); printf("%d\n",a+fun(10));}程序的运行结果是A)0B)10C)20D) 出错

考题 有以下程序 main() { char str[][10]={"China","Beijing"},*p=str; printf("%s\n",p+10); } 程序运行后的输出结果是A.ChinaB.BeijingC.ngD.ing

考题 有以下程序 include main() { int n,*p=NULL; *p=n; printf(" 有以下程序 #include <stdio.h> main() { 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);

考题 有以下程序 include void f(char p[][10],int n)/*字符串从小到大排序*/ { 有以下程序 #include<string.h> void f(char p[][10],int n)/*字符串从小到大排序*/ { char t[10];int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) {strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);} } main() { char p[5][10]={"abc","aabdfg:,"abbd","dcdbe","cd"}; f(p,5); printf("%d\n",strlen(p[0])); } 程序运行后的输出结果是A.2B.4C.6D.3

考题 有以下程序:inlucdemain()D)2 3 3{int n,*P=NULL;*p=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);

考题 若有以下程序main(){ int p,a=5;if(p=a!=0)printf("%d\n",p);elsepfintf("%d\n",p+2);}执行后输出结果是【 】。

考题 有以下程序:includevoid f(char p[][10],int n){char t[10];int i,j;for(i=0;i 有以下程序: #include<string.h> void f(char p[][10],int n) {char t[10];int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) {strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);} } main() {char p[5][10]={"abc","aabdfg","abbd","dedbe","cd"}; f(p,5); printf("%d\n",strlen(p[0]));} 程序运行后的输出结果是( )。A.2B.4C.6D.3

考题 有以下程序#include stdio.hmain { 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);

考题 有以下程序includevoid f(int *p,int *q);main(){ int m=1,n=2,*r=m;f(r, n 有以下程序 #include<stdio.h> void f(int *p,int *q); main() { int m=1,n=2,*r=m; f(r, n); printf("%d,%d",m,n); } void f(int*p,int*q) {p=p+1; *q=*q+1;) 程序运行后的输出结果是______。A.1,3B.2,3C.1,4D.1,2

考题 有以下程序includestdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,stdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,n);printf(”%d\n”,*r);}int-f(int*P,int*q)(return(*p*q)?p:q;)程序运行后的输出结果是______。

考题 有以下程序 #includestdio.h void fun(int p) {int d=2; p=d++;printf("%d".p);} main( ) {int a=1; fun(a):printf("%d\n",a);) 程序运行后的输出结果是( )。A.32B.12C.21D.22

考题 有下列程序main(){ int a[5]={2,4,6,8,10},*p,**k; p=a; k=p; printf("%d",*(p++)); printf("%d\n",**k);}运行该程序,其输出结果是A.4 B.22C.24 D.46

考题 下列程序段的输出结果是______。 int **pp,*p; int a=10,b=20; p=a; pp=p; p=b; printf("%d,%d\n",*p,**pp);A.10,20B.10,10C.20,20D.20,10

考题 有以下程序 include include int fun(int n) {int * 有以下程序 #include <stdio.h> #include <stdlib.h> int fun(int n) {int *p; p=(int*)malloc(sizeof(int)); *p=n; return *p; } { int a; a=fun(10); printf("%d\n",a+fun(10)); } 程序的运行结果是______。A.0B.10C.20D.出错

考题 以下程序运行后的输出结果是main{ int p=30; printf("%d\n",(p/30?p/10 : p%3));}

考题 A)(仕兰微面试题目)#i ncludevoid testf(int*p){*p+=1;}main(){int *n,m[2];n=m;m[0]=1;m[1]=8;testf(n);printf("Data v alue is %d ",*n);}------------------------------B)#i ncludevoid testf(int**p){*p+=1;}main(){int *n,m[2];n=m;m[0]=1;m[1]=8;testf(n);printf(Data v alue is %d",*n);}下面的结果是程序A还是程序B的?Data v alue is 8那么另一段程序的结果是什么?

考题 有下列程序: #includestdi0.h #includestdlib.h intfun(intn) {int*P; p=(int*)malloc(sizeof(int)); *P=n;return*P; } voidmain( ) {inta; a=fun(10);printf("%d\n",a+fun(10));} 程序的运行结果是( )。A.0B.10C.20D.出错

考题 以下程序的输出结果是( )。 main {char str[]1-10]={"china","beijing"),*p=str; printf("%s\n",p+10); }A. ChinaB.BeijingC.ngD.ing

考题 若有以下程序main(){ int p=5,a=5; if(p=1!=0) printf("%d\n",p); else printf("%d\n",p+2);}程序执行后的输出结果是

考题 有下列程序: #includestdi0.h voidf(int*P,int*q); voidmain( ) (intm=1,n=2,*r=&m; f(r,&n);printf("%d,%d",m,n); } voidf(int*P,int*q){p=p+1;*q=*q+1;} 程序运行后的输出结果是( )。A.1,3B.2,3C.1,4D.1,2

考题 有以下程序main(){ int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a[3],*q=p+2;printf("%d\n",*p+*q);}程序运行后的输出结果是

考题 有以下程序: main() {int a=[10]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, *p=a[3], *q=p+2; printf("% d\n", *p+*q); } 程序运行后的输出结果是______。A.16B.10C.8D.6

考题 有以下程序#ncludestdio.hmain(){ struct node{int n;struct nodc*next;}*p;struct node x[3]={{2,x+1},{4,x+2},{6,NULL}};p=x:printf("%d,",p-n);printf("%d\n",P-next-n);}程序运行后的输出结果是A.2,3B.2,4C.3,4D.4,6

考题 以下程序的输出结果是( )。main{char str[][10]={china,beijing),*p=str;printf(%s\n,p+10);}A.ChinaB.BeijingC.ngD.ing

考题 以下程序运行后的输出结果是() main()   {int a[10]={l,2,3,4,5,6,7,8,9,10},*p=&n[3], *q=p+2;    printf(”%d\n”,*p+*q);    }

考题 填空题以下程序运行后的输出结果是() main()   {int a[10]={l,2,3,4,5,6,7,8,9,10},*p=&n[3], *q=p+2;    printf(”%d\n”,*p+*q);    }

考题 单选题有以下程序:#include void f(int*p,int*q);main(){ int m=1,n=2,*r=m; f(r,n); printf("%d,%d",m,n);}void f(int*p,int*q){ p=p+1; *q=*q+1;}程序运行后的输出结果是(  )。A 1,3B 2,3C 1,4D 1,2