题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-09 05:47:54

[填空题]下列程序运行时输入1234567<CR>,则输出结果是______。
#include<stdio.h>
main( )
int a=1,b;
scanf("%2d%2d",&a,&b);printf("%d %d/n", a,b);

更多"下列程序运行时输入1234567<CR>,则输出结果是______。 "的相关试题:

[填空题]以下程序运行时若从键盘输入:10 20 30<回车>,输出结果是
# include<stdio.h>
main( )
int i=0,j=0,k=0;
scanf("%d% *d%d",&i,&j,&k);printf("%d %d %d//n",i,j,k);

[填空题]

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


[单项选择]若程序执行时的输入数据是"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
[简答题]以下程序运行时输入:12<回车>,执行后输出结果 #include<stdio.h> main( ) {char ch1,ch2;int n1,n2; ch1=getchar( );ch2=getchar( ); n1=ch1-’0’;n2=n1*10+(ch2-’0’); printf("%d/n",n2); }
[填空题]

下列程序运行时,若输入labcedf2df<回车>输出结果为()。
#include<stdio.h>
main( )
{ char a=0,ch;
while((ch==getchar( ))!=’/n’)
{ if(a%2!=0&&(ch>=’a’&&ch<=’z’)) ch=ch’a’+’A’;
a++;prtchar(ch);
}
printf("/n");
}


[单项选择]以下程序运行时,输入的值在哪个范围才会有输出结果()
#include<stdio.h>
main( )
int x;
 Scanf("%d", &x);
 if(x<=3); else
 if(x!=10) printf("%d/n", x);

A. 不等于10的整数
B. 大于3且不等于10的整数
C. 大于3或等于10的整数
D. 小于3的整数
[单项选择]下面程序的输出结果是
#include< stdio.h>
#include< string.h>
main( )
char p1[20]="abc", *p2="ABC", str[50]="xyz";
strcpy(str+2, strcat(p1, p2));
printf("%s/n", str);
A. xyzabcABC
B. zabcABC
C. xyabcABC
D. yzabcABC
[单项选择]下列程序的输出结果是( )。
#include<stdio.h>
#include<string.h>
void fun(int b[])
static int i=0;
do
b[i]+=b[i+1];
while(++i<2);
main( )
int k, a[5]=1, 3, 5, 4, 9;
fun(a);
for(k=0; k%5; k++)printf("%d", a[k]);

A. 13579
B. 48579
C. 48549
D. 48999
[单项选择]运行下面程序时,从键盘输入字母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!
[单项选择]运行下面的程序时,从键盘输入字母H,则输出结果是
#include <stdio.h>
main( )
char ch;
ch=getchar( );
switch(ch)
case 'H':printf("Hello!/n");
case 'G':printf("Good moming!/n");
default:printf("Bye_Bye!/n");


A. Hello!
B. Hello!
C. Hello!
D. Hello!
[单项选择]以下程序运行后的输出结果是
#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. 出错
[单项选择]若运行时从键盘上输入2.0<CR>(<CR>表示回车),则该程序的输出结果是( )

A. 0.000000
B. 0.250000
C. 0.500000
D. 1.000000
[填空题]下列程序运行时输入1234567<CR>,则输出结果是______。 #include<stdio.h> main( ) { int a=1,b; scanf("%2d%2d",&a,&b);printf("%d %d/n", a,b); }

我来回答:

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

订单号:

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