更多"以下程序运行后,输出结果是 ( ) #include<stdio."的相关试题:
[单项选择]以下程序运行后的输出结果是 #include<stdio.h> main( ){ char s[]="rstuv"; printf("%c/n", *s+2); }
A. tuv
B. 字符t的ASCII码值
C. t
D. 出错
[单项选择]以下程序运行后的输出结果是 #include<stdio.h> void fun(char *c, int d) { *c=*c+1;d=d+1; printf("%C, %c,", *c, d); } main( ) { char b='a', a='A'; fun(&b, a); printf("%c, %c/n", b, a); }
A. b,B,b,A
B. b,B,B,A
C. a,B,B,a
D. a,B,a,B
[单项选择]以下程序的输出结果是 #include void main( )
{ char c='Z'; cout < < c-25;}
A. 97
B. Z
C. z-25
D. 2
[单项选择]以下程序的输出结果是( )。 #include<iostream.h> int fun (char*s) { char *p=s; while (*p!='/0,) p++: return (p-s): } void main( ) { cout<<fun (" ABCDEF ")<<endl: }
A. 3
B. 6
C. 8
D. 0
[单项选择]设已执行预编译命令#include<string.h>,以下程序段的输出结果是 char s[]=" an apple" ; printf("%d/n",strlen(s));
A. 7
B. 8
C. 9
D. 10
[单项选择]以下程序在VC6平台上编译运行,程序运行后的输出结果是 #include<stdio.h> main( ){ int s, t, A=10; double B=6; s=sizeof(A); f=sizeof(B); printf("%d, %d/n", s, t); }
A. 2,4
B. 4,4
C. 4,8
D. 10,6
[单项选择]以下程序运行后的输出结果是______。 ss(char*s) { char*p=s; while(*p)p++; return(p-s); } main( ) { char*a="abded";int i; i=ss(a); printf("%d/n",i); }
A. 8
B. 7
C. 6
D. 5
[单项选择]有以下程序
#include<iostream.h>
void ss(char*s,char t)
{ while(*s)
{ if(*S==t)*s=t-''a''+''A'';
s++;} }
void main( )
{ char strl[100]="abcddfefdbd",c=''d'':
ss(strl,c) ;cout<<strl;}
程序运行后的输出结果是( )。
A. ABCDDEfEBD
B. abcDDfefDbD
C. abcAAfefALbA
D. Abcddfefdbd
[单项选择]如下程序的输出结果是 #include<stdio.h> main( ) { char ch[2)[5]={"6937","8254"},*p[2]; int i,j,s=0; for (i=0;i<2;i++) p[i]=ch[i]; for (i=0;i<2;i++) for(j=0;p[i][j]>'/0';j+=2) s=10*s+p[i][j]-'0'; printf("%d/n",s);}
A. 69825
B. 63825
C. 6385
D. 693825
[单项选择]有以下程序程序运行后的输出结果是【 】。
main( )
{ Int k=5,n=0;
do
{switch(k)
{case 1: case 3:n+=1;k--;break;
default:n=0;k;
case 2: case 4 : n+=2;k--;break;
}
printf("%d",n);
}while(k>0 &&n<5);
}
A. 235
B. 0235
C. 02356
D. 2356