更多"以下程序运行后的输出结果是 【8】 。 #include <stdio"的相关试题:
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
int i=5;
do
if(i%3==1
if(i%5==2)
printf("*%d",i);break;
i++:
while(i!=0);
printf("/n");
A. %7
B. *3*5
C. *5
D. *2*6
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
int x=8;
for(;x>0;x--)
if(x%3) printf("%d,",x--);continue;
printf("%d,",--x);
A. 7,4,2
B. 8,7,5,2
C. 9,7,6,4
D. 8,5,4,2
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
int c=0, k;
for(k=1; k<3; k++)
switch(k)
default: c+=k;
case 2: c++; break; case 4: c+=2; break;
printf("%d/n", c);
A. 3
B. 5
C. 7
D. 9
[填空题]以下程序运行后的输出结果是 。
#include <stdio, h>
main( )
int a = 1,b =2,c =3;
if( c = a) printf( "% d //n" ,c);
else printf( "% d //n" ,b);
[填空题]以下程序运行后的输出结果是 。
#include <stdio.h>
main( )
int a,b,c;
a =25;b =025;e =0x25;
prinff("%d %d %d//n",a,h,c);
[填空题]以下程序运行后的输出结果是 【10】 。
#include <stdio.h>
main( )
int p[7] =11,13,14,15,16,17,18;
int i=0,j=0;
while(i<7 && p[i]%2==1) j+ =p[i++];
prinff( "% d /n" ,j);
[填空题]以下程序运行后的输出结果是 【13】
#include <stdio, h> fun( int a)
{ int b = 0; static int c = 3;
b++;c++;
return(a + b + c);
}
main( )
int i,a = 5;
for(i =0;i <3;i ++ ) prinff("% d% d" ,i,fun(a) );
printf(" /n" );
}
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
int f(int x)
int y;
if(x==0 ‖ x==1) return(3);
y=x*x-f(x-2);
return y;
main( )
int z;
z=f(3);printf("%d/n",z);
A. 0
B. 9
C. 6
D. 8
[填空题]以下程序运行后的输出结果是 【13】
#include <stdio, h> fun( int a)
int b = 0; static int c = 3;
b++;c++;
return(a + b + c);main( )
int i,a = 5;
for(i =0;i <3;i ++ ) prinff("% d% d" ,i,fun(a) );
printf(" /n" );
[填空题]以下程序运行后的输出结果是 【20】 。
#include <stdio.h>
fun(int x)
if(x/2>0) fun(x/2);
printf("%d",x);
main( )
fun(6);
[填空题]
以下程序运行后的输出结果是()。
#include<stdio.h>
main( )
{ int k=1,s=0;
do{
if((k%2)!=0) continue;
s+=k; k++;
}while(k>10);
printf("s+%d/n",s);
}
[填空题]
以下程序运行后的输出结果是 (6) 。
#include<stdio.h>
main( )
{int a=200,b=010;
printf("%d%d/n",a,b);
}
[单项选择]以下程序运行后的输出结果是
#include <stdio.h>
int fun(int(*s)[4],int n,int k)
int m,i;
m=s[0][k];
for(i=1;i<n;i++) if(s[i][k]>m)m=s[i][k];
return m;
main( )
int a[4][4]=1,2,3,4,11,12,13,14,21,22,23,24,31,32,33,34 ;
prinff("%d/n",fun(a,4,0));
A. 4
B. 34
C. 31
D. 32