更多"以下程序运行后的输出结果是 #include <stdio.h> "的相关试题:
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
int x=1,y=2,z=3;
it(x>y)
if(y<z) printf("%d",++z);
else printf("%d",++y);
printf("%d/n",x++);
A. 331
B. 41
C. 2
D. 1
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
int i,j;
for(i=3;i>=1;i--)
for(j=1;j<=2;j++)printf("%d",i+j);
printf("/n");
A. 2 3 4
B. 4 3 2
C. 2 3
D. 4 5
[单项选择]下列程序的输出结果是( )。
#include<stdio.h>
main( )
char a[]='a','b','c','d','e','f','/0';
int i,j;
i=sizeof(
A. ;
B. 7,6
C. 6,6
D. 6,7
[单项选择]以下程序运行后,输出结果是______。
#include<stdio.h>
ss (char *s)
char *p=s;
while(*.p)p++;
return(p-s);main( )
char *a="abded";
int i;
i=ss((A);
print ("%d/n",i);
A. 8
B. 7
C. 6
D. 5
[单项选择]以下程序的输出结果是( )。
#include <stdio.h>
main( )
int a=21,b=11;
printf("%d/n",--a+b,--b+
A. ;
[单项选择]以下程序的输出结果是______。
#include<stdio.h>
main( )
int a=200;
#define a 100
printf("%d",
A. ;
[单项选择]以下程序的输出结果是_______。
#include<stdio.h>
main( )
int i;
for(i=1;i<5;i++)
if(i%2)printf("*");
else continue;
printf("#");
printf("$/n");
A. *#*#*#$
B. #*#*#*$
C. *#*#$
D. #*#*$
[单项选择]有以下程序
#include<stdio.h>
main( )
unsigned char a=8, c;
c=a>>3;
printf("%d/n", c);
程序运行后的输出结果是______。
A. 32
B. 16
C. 1
D. 0
[单项选择]有以下程序
#include
main( )
{ char str[][20]={"Hello","Beijing"},*p=str;
printf("%d/n",strlen(p+20));
}
程序运行后的输出结果是()
A. 0
B. 5
C. 7
D. 20
[单项选择]下面程序的结果是( )。
#include<iostream.h>
void main( )char *str;
str="test!";
cout<<str[5];
[单项选择]有以下程序
#include
main( )
{char c1,c2,c3,c4,c5,c6; scanf("%c%c%c%c",&c1,&c2,&c3,&c4); c5=getchar( ); c6=getchar( ); putchar(c1); putchar(c2); printf("%c%c/n",c5,c6);
}
程序运行后,若从键盘输入(从第1列开始)
123<回车>
45678<回车>
则输出结果是______。
A. 1267
B. 1256
C. 1278
D. 1245
[单项选择]有以下程序:
#include <string.h>
main( )
char p[20]='a','b','c','d',q[]="abc",r[]="abcde";
strcat(p,r); strcpy(p+strlen(q),q);
printf("%d/n",strlen(p));
程序运行后的输出结果是( )。
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
struct st
int x,y; data[2]=1,10,2,20;
main( )
struet st *p=data;
printf("%d,",p->y);printf("%d/n",(++p)->x);
A. 10,1
B. 20,1
C. 10,2
D. 20,2
[单项选择]有以下程序
#include<stdio.h>
main( )
char b, c; int i;
b='a'; c='A';
for(i=0; i<6;i++)
if(i%2) putchar(i+b);
else putchar(i+c);
printf("/n");
程序运行后的输出结果是______。
A. ABCDEF
B. AbCdEf
C. aBcDeF
D. abcdef
[单项选择]以下程序的输出结果是( )。
#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
[单项选择]以下程序运行后输出的结果是 ______。
Option Base 1
Private Sub Form_Click( )
Dim A(20)
For K=1 To 20
A(K)=K^2
Next K
Print A(K)
End Sub
A. 20
B. 441
C. 400
D. 出错信息
[单项选择]以下程序的输出结果是( )。
char str[15]=”hello!”;
printf(“%d/n”,strlen(str));
A. 15
B. 14
C. 7
D. 6
[单项选择]有以下程序
#include<stdio.h>
main( )
char s[]="012xy/08s34f4w2";
int i, n=0;
for(i=0; s[i]!=0; i++)
if(s[i]>='0'&&s[i]<='9') n++;
printf("%d/n", n);
程序运行后的输出结果是______。
A. 0
B. 3
C. 7
D. 8