更多“下列程序的输出结果是()。 #include<stdio.h> main() { int a=2,b=3,P; p=f(a,b); printf”相关的问题
第1题
有以下程序 #include <stdio.h> main() { int a=2,b=2,c=2; printf("%d\n",a/b&c); } 程序运行后的输出结果是
点击查看答案
第2题
下面程序的运算结果为( ) #include <stdio.h> void swap(int *px, int *py); void swap(int *px, int *py) { int t; t=*px; *px=*py; *py=t; } void main() { int a=3,b=5; swap(&a,&b); print(“%d,%d\n”,a, b); }
点击查看答案
第3题
以下程序 #include <stdio.h> main() { int a = -2, b = 0; while (a++ && ++b) ; printf("%d,%d\n", a, b ); } 程序运行后输出结果是 (难度系数★★)
点击查看答案
第4题
以下程序运行后的输出结果是 #include <stdio.h> main() {int a[5]={1,2,3,4,5},b[5]={0,2,1,3,0},i,s=0; for(i=1;i<3;i++) s="s+a[b[i]];" printf(“%d”,s);}> A、6
点击查看答案
第5题
若有以下程序 #include <stdio.h> main(){ int a=1,b=2,c=3,d=4,r=0; if(a!=1) ; else r=1; if(b==2) r+=2; else; if(c!=3) r+=3; else; if(d==4) r+=4; printf("%d\n",r); }
点击查看答案
第6题
有以下程序 #include <stdio.h> main() { int a=2, c=5; printf( "a=%%d,b=%%d\n", a,c ); } 程序的输出结果是( )
A、a=2,b=5
B、a=%2,b=%5
C、a=%d,b=%d
D、a=%%d,b=%%d
点击查看答案
第7题
有以下程序 #include(stdio.h> main() {int a=l;b=2; for(;a<8;a++) {b+="a;a+=2;}" printf("%d,%d\n",a,b); }> A、9,18
点击查看答案
第8题
有以下程序:#include "stdio.h" #include <stdlib.h> int main() { int *q,*p; p=(int *) malloc(sizeof(int)*20); q=p; scanf("%d%d",p,q); printf("%d,%d\n",*p,*q); return 0; } 若从键盘输入:10 20↙,则程序运行结果是()。
A、20,20
B、10,20
C、20,10
D、10,10
点击查看答案
第9题
#include <stdio.h> int main() { int a,b,c; a=10; b=23; c=a+b; printf("a+b="); printf("%d\n",c); return 0; } 该程序的运行结果是
点击查看答案