首页/ 题库 / [单选题]下面程序输出结果是 ______。 #i的答案

下面程序输出结果是 ______。 #include<iostream. h> void main(){ int a,b,c; a=6;b=c=4; if(a!=B) if(a!=B) if(a) cout<<(a-->2); else a++; else a+=a; cout<<a; }

单选题
2022-02-24 07:11
A、15
B、7
C、12
D、17
查看答案

正确答案
A

试题解析

标签:
感兴趣题目
在下面程序运行后,输出结果为 ______。 #include<iostream.h> void count(int x[],int n,int &y){ int k; y=0; for(k=0:k<n;k++) if(x[k]<0) y++; } void main(){ int b[]={2,1,-8,-3,7,2,4,6,0,-13}; int x; count(b,10,x); cout<<“x”<<x<<end1; }
下面程序的输出结果为______。 #include<string.h> main() { char p1[7]="abc",p2[]="ABC",str[50]="xyz"; strcpy(str,strcat(p1,p2)); printf("%s",str); }
以下程序的输出结果是______。 main() {printf("%d ",NULL); }
以下程序的输出结果是______。 #include<stdio.h> main() { int a,b,d=241; a=d/100%9; b=(-1)&&(-1); printf("%d,%d",a,b); }
请读程序: #include<stdio.h> main() { int a=5,b=7,c=9; pintf("%d,%d,"a,b,C) ; printf("%d,%d",a,D) ; } 上面程序的输出结果是_______。
以下程序输出结果是 ______。 #include<iostream.h> void n(int i); void f2(int i); char st[]=”Howdoyoudo!”; void fl(int i){ cout<<st[i]; if(i<3){ i+=2: f2(i): } } void f2(int i) { cout<<st[i]; if(i<3) { i+=2; f1(i); } } void main() { int i=0; f1(i); }
下列程序的输出结果是______。#include <stdio.h>main (){ printf("%d ",NULL);}
下列程序的输出结果是______。 #include<stdio.h> main () { int a=2,c=5; printf("a=%%d,b=%%d ",a,c); }
以下程序的输出结果是_______。 #include<stdio.h> main() { printf("%d ",NULL); }
有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d ",t); } 程序运行后的输出结果是______。
以下程序的输出结果是______。 #include<stdio.h> main() { int a=200; #define a 100 printf("%d",a) ; #undefa printf("%d",a) ; }
以下程序的输出结是_______。 #include <stdio.h> main() { int a=200; #define a 100 printf("%d",a); #undefa printf(%d",a); }
相关题目
下面程序的输出结果是______。 void prty(int *x) {printf("%d ",++ *x); } main() { int a=25; prty(&a); }
下面程序的输出结果是______。 main() { int x=0x48; printf("%d ",--x); }
下面程序的输出是_________#includevoid main(){int x=023;printf("%d\n",--x);}
执行下面程序中的输出语句后,输出结果是_____#includevoid main(){int a;printf("%d\n",(a=35,a4,a+5));}
下面程序运行结果是_____。 void fun(int x) { printf("%d\n",++x); } main() {int a=25;fun(&a);}
有如下程序 #include<iostream.h> viod main() { int i,sum=0; for(i=1;i<=3;sum++) sum+=i; cout<<sum<<end1; } 该程序的执行结果是 ______。
以下程序输出结果是 ______。 #include<iostream.h> void main(){ int a[3][3]={1,3,5,7,9,10,13,15,17},sum=0,i,j; for(i=0;i<3:i++) for(j=0;j<3;j++){ a[i][j]=i+j; if(i= =j)sum=sum+a[i][j]; } cout<< "sue="<<sum; }
有以下程序: # include<string.h> main() { char str[][20]={"Hello","Beijing"},*p=str; printf("%d ",strlen(p+20)); } 程序运行后的输出结果是 ______。
下面程序的输出结果为______
以下程序的输出结果是 ______。 #include<iostream.h> void main(){ int i,j; for(j=10;j<=11;j++){ for(i=9;i<j:j++) if(!(j%i))break; if(i>j-1)cout<<j<<" " ; } }
下面程序的输出结果是______。 main() { unsigned a=32768; printf("a=%d ",a); }
有以下程序,程序运行的结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char x[]= "C++" ,y[10]= "C++" ; cout<<sizeof(x)/sizeof(char)<<“,”<<sizeof(y)/sizeof(char); }
下面程序的输出结果是______。 #include<stdio.h> main() { char *p[]="BOOL","OPK","H","SP"}; int i; for(i=3;i>=0;i-,i-) printf("%c",*p[i]); printf(" "); }
以下程序中,while语句的循环次数是 ______。 #include<iostream.h> viod main() { int i=0; while(i<10) { if(i<1)continue; if(i==5) break; i++; } }
以下程序的输出结果是_______。 #include<stdio.h> main() { int i; for(i=1;i<5;i++){ if(i%2)printf("*"); else continue; printf("#"); } printf("$ "); }
当执行下面的程序时,如果输入ABC,输出结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char ss[10]=“XYZWV”; cin>>ss; strcat(ss,”DEFG”); cout<<ss; }
当执行下面的程序时,如果输入ABC,则输出结果是______。 #include "stdio.h" #include "string.h" main() { char ss[10]="12345"; gets(ss);strcat(ss,"6789"); printf("%s ",ss); }
以下程序的执行结果是 ______。 #include<iostream.h> class Sample { int x; public: Sample(){}; Sample(int a){x=a;} Sample(Sample &a){x=a.x+1;} void disp(){cout<<"x="<<x<<end1;} } void main() { Sample s1(2),s2(s1); s2.disp(); }
以下程序的输出结果是 ______。 #include<iostream.h> void main(){ char s1[]=”Hello”,s2[]="World"; char *p1,*p2; int i; p1=s1; p2=s2; for(i=0;i<5;i++) if(*(pl+i)==*(p2+i)) cout<<*(p1+i); }
下面程序输出结果是 ______。 #include<iostream. h> void main(){ int a,b,c; a=6;b=c=4; if(a!=B) if(a!=B) if(a) cout<<(a-->2); else a++; else a+=a; cout<<a; }
广告位招租WX:84302438

免费的网站请分享给朋友吧