题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-01-07 00:25:18

[单项选择]当输入为"Fool&Swalow"时,下面程序的执行结果是( )。
#include<stdio.h>
main( )
char c;
while(c!='')
c=getchar( );
putchar(C) ;


A. Swalow
B. Fool
C. Fool
D. Swalow

更多"当输入为'Fool&Swalow'时,下面程序的执行结果是( )。 "的相关试题:

[单项选择]当输入为"quert"时,下面程序的执行结果是
#include<stdio.h>
main( )
char c;
c=getchar( );
while(c!='')

putchar(c);
c=getchar( );


A. quert
B. Rvfsu
C. quert
D. rvfsu
[单项选择]当输入为”hello”时,下面程序的执行结果是( )。
# include<stdio.h>
main( )
char c;
c=getchar( );
while(c!='')
putchar(c);break;


A. Rvfsu
B. h
C. hello
[单项选择]若程序执行时的输入数据是"2473",则下述程序的输出结果是
#include<stdio.h>
void main( )
int cs;
while((cs=getchar( ))!=,'/n')
switch(cs='2')
case0
case 1:putchar(cs+4);
case 2:putchar(cs+4);
break;
case 3:putchar(cs+3);default:putchar(cs+2);
A. 668977
B. 668966
C. 6677877
D. 6688766
[单项选择]阅读下面程序,则执行后的结果是
#include "stdio.h"
main( )
char str[]="tomeetme",*p;
for(p=str;p<str+7;p+=2) putchar(*p);
printf("/n");

A. tomeetme
B. tmem
C. oete
D. tome
[单项选择]若执行下面的程序时,从键盘输入5和2,则输出结果是( )。
#include <stdio.h>
main( )
int a, b, k;
scan("%d, %d", &a, &b);
k=a;
if(a<b) k=a%b;
else k=b%a;
printf("%d/n",k);
A. 5
B. 3
C. 2
D. 0
[单项选择]阅读下面程序,则执行后的结果是()
#include "stdio, h"
main( )
char str[]="tomeetme", *p;
for(p=str; p<str+7; p+=2)putchar(*p);
printf("/n");

A. tomeetme
B. tmem
C. oete
D. tome
[填空题]阅读下面程序段,则执行后输出的结果是
#include "stdio.h"
main( )
char fun(char,int);
char a=’A’;
int b=13;
a=fun(a,b);
putchar(a);
char fun(char a,int b)
char k;
k=a+b;
return k;
[单项选择]执行以下程序时输入1234567<CR>,则输出结果是
#include <stdio.h>
main( )
int a=1,b;
scanf("%3d%2d",&a,&b);
printf("%d%d/n",a,b);

A. 12367
B. 12346
C. 12312
D. 12345
[填空题]

执行以下程序时输入1234567<CR>,则输出结果是 【6】
#include <stdio.h>
main( )
{ int a=1,b;
scanf("%2d%2d",&a,&b); prinff("%d %dhn",a,b);
}


[单项选择]运行下面程序时,从键盘输入字母H,则输出结果是( )。
#include<stdio.h>
main( )
char ch;
ch=getchar( );
switch(ch)
case 'H':printf("Hello!/n");
case 'G':printf("Good morning!/n");
default:printf("Bye_Bye!/n");


A. Hello!
B. Hello!
C. Hello!
D. Hello!
[单项选择]下面程序的输出结果是
#include<stdio.h>
#include<string.h>
main( )
char*p1="abc",*p2="ABC",str[50]="xyz";
strcpy(str+2,streat(p1,p2));
printf("%s/n",str);
A. xyzabcABC
B. zabcABC
C. xyabcABC
D. yzabcABC
[单项选择]下面程序的运行结果是
#include<stdio.h>
#include<string.h>
main( )
char*s1="AbDeG";
char*s2="AbdEg";
s1+=2;s2+=2;
printf("%d/n",strcmp(s1,s2));

A. 正数
B. 负数
C. 零
D. 不确定的值
[填空题]阅读下面程序,则执行后的输出结果是______。
#include"stdio.h"
main( )
int x,y,z;
x=1;y=2;z=3;
if(x>y)if(x>z)printf("%d",x);
else printf("%d",y);
printf("%d/n",z);
[单项选择]下面程序的输出结果是( )。
#include<stdio.h>
#include<string.h>
main( )
char pl[20]="123 ", *p2="ABC ", str[50]="xyz";
strcpy(str+2, strcat(p1, p2) );
printf("%s/n", str);
A. xyzabzac
B. bAcBACBC
C. xy123ABC
D. yz123ABC
[单项选择]下面程序的输出结果是( )。
#include <stdio.h>
#include <string>
void main( )
char s1[50]="some string*",s2[]="test";
printf("%s/n", strcat(s1,s2));

A. some string*
B. test
C. some stritest
D. some string *test

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码