题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-01-31 21:40:09

[填空题]以下程序运行后的输出结果是 【17】
#include <stdio, h>
#include <string, h>
main( )
char ch[] ="abc".,x[3] [4]: int i:
for(i=0;i<3:i ++) strcpy(x[i] ,ch):
for(i =0;i<3:i++) printf( "% s" ,&x[i] [i]);
printf(" /n" )

更多"以下程序运行后的输出结果是 【17】 。#include <stdio"的相关试题:

[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
#include<string.h>
void fun(char *s[],int n)
char *t;int i,j;
for(i=0;i<n-1;i++)
for(j=i+1;j<n;j++)
if(strlen(s[i])>strlen(s[j]))t=s[i];s[i]=s[j];s[j]=t;

main( )
char *ss[]="bcc","bbcc","xy","aaaacc","aabce";
fun(ss,5);printf("%s,%s/n",ss[0],ss[4]);

A. xy,aaaace
B. aaaacc,xy
C. bcc,aabcc
D. aabcc,bcc
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
#include<stdlib.h>
int fun(int n)
int *p;
p=(int*)malloe( sized ( int ));
* p=n; return * p;

main( )
int a;
a=fun(10);printf("%d/n",a+fun(10));

A. 0
B. 10
C. 20
D. 出错
[填空题]53. 以下程序运行后的输出结果是
#include <stdio.h>
#include <string.h>
char * ss(char * s)
char * p,t;
p=s+1:t= *s:
whilet * p) *(,p-1) = *p; p++;
* (p-1) =t;
return s :
main ( )
char * p,str[10] =" abedefgh";
p = ss(str); printf( "% s //n". p):
[填空题]以下程序运行后的输出结果是 【16】
#include <stdio, h>
#include <stating, h>
void fun(char * s,int p,int k)
int i;
for(i=p;i<k-1;i++) s[i] =s[i+2];main( )
char s [] = "abedefg";
fun(s,3 ,strlen(s) ); puts(s);

[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
FILE * fp;int a[10]=1,2,3,i,n;
fp=fopen("d1.dat","w");
for(i=0;i<3;i++) fprintf(fp,"%d",a[i]);
fprintf(fp,"/n");
fclose(fp);
fp=fopen("d1.dat","r");
fscanf(fp,"%d",&n);
fclose(fp);
printf("%d/n",n);

A. 12300
B. 123
C. 1
D. 321
[单项选择]以下程序运行后的输出结果是
#include <stdio.h>
main( )
struct STUchar name[9];char sex;double score[2];;
struct STU a="Zhao",’m’,85.0,90.0,b="Qian",’f’,95.0,92.0;
b=a;
printf("%s,%c,%2.0f,%2.0f/n",b.name,b.sex,b.score[0],b.score[1]);
A. Qian,f,95,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90
[填空题]以下程序运行后输出结果是 【18】 。 #include <stdio, h> void swap(int x.int y) { int t; t = x;x = y;y = t: printf( "% d % d ",x,y); } main ( ) { iht a=3,b=4: swap(a,b); prinff( "% d % d" ,a,b); }
[填空题]以下程序运行后的输出结果是 【15】
#include <stdio.h>
#include <string.h>
char * ss(char * s)
char * p,t;
p=s+1:t= *s:
whilet * p) *(,p-1) = *p; p++;
* (p-1) =t;
return s :
main ( )
char * p,str[10] =" abedefgh";
p = ss(str); printf( "% s /n". p):
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
#define N 8
void fun(int *x, int i)*x=*(x+i);
main( )
int a[N]=1, 2, 3, 4, 5, 6, 7, 8, i;
fun(a, 2);
for(i=0; i<N/2; i++) printf("%d", a[i]);
printf("/n");

A. 1313
B. 2234
C. 3234
D. 1234
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
int x=1,y=0,a=0,b=0;
switch(x)
case 1:
switch(y)
ease 0:a++;break;
ease 1:b++;break;

ease 2:a++;b++;break;
case 3:a++:b++:

printf("a=%d,b=%d/n",a,b);

A. a=1,b=0
B. a=2,b=2
C. a=l,b=1
D. a=2,b=1
[单项选择]以下程序运行后的输出结果是
#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>
#define N 4
void fun(int a[][N],int b[])
int i:
for(i=0;i<N;i++) b[i]=a[i][i];

main( )
int x[][N]:1,2,3,4,5,6,7,8,9,10,y[N],i;
fun(x,y);
for(i=0;i<N;i++) printf("%d,",y[i]);
prinff("/n");
A. 1,2,3,4,
B. 1,0,7,0,
C. 1,4,5,9,
D. 3,4,8,10,
[填空题]以下程序运行后的输出结果是
#include <stdio.h>
int f( iht a[] ,int n)
if(n>=1) returnf(a,n-1) +a[n-1];
else return 0;
main( )
int aa[5] = 1,2,3,4,5 ,s;
s = f(aa,5); prinff(" % d //n" ,s);

[填空题]以下程序运行后的输出结果是 【9】
#include <stdio.h>
main ( )
char a[] ="123456789", *p;
int i =0;
p=a;
while( * p)
if(i%2 ==0) *p=’*’;
p++;i++;

puts(a);

[单项选择]以下程序运行后的输出结果是( )。 #include<stdio.h> void reverse(int a[],int n) {int i,t; for(i=0;i<n/2;i++) {t==a[i];a[i]=a[n-1-i];a[n-1-i]=t;} } main( ) {int b[10]={10,9,8,7,6,5,4,3,2,1};int i,s=0; reverse(b,10); for(i=0;i<3;i++)s+=b[i]; printf("%d/n",s); }
A. 27
B. 6
C. 25
D. 30

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码