首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序: #include<stdio.h> main() {int a1,a2;char c1,c2; scanf("%d%c%d%c",&a1,&c1,&a2,&c2); printf("%(1,%c,%d,%c",a1,c1,a2,c2); }
有以下程序: #include<stdio.h> main() {int a1,a2;char c1,c2; scanf("%d%c%d%c",&a1,&c1,&a2,&c2); printf("%(1,%c,%d,%c",a1,c1,a2,c2); }
admin
2021-02-25
31
问题
有以下程序:
#include<stdio.h>
main()
{int a1,a2;char c1,c2;
scanf("%d%c%d%c",&a1,&c1,&a2,&c2);
printf("%(1,%c,%d,%c",a1,c1,a2,c2);
}
若想通过键盘输入,使得a1的值为12,a2的值为34,c1的值为字符a,c2的值为字符b,程序运行后的输出结果是:12,a,34,b。则正确的输人格式是(以下
代表空格,<CR>代表回车)( )。
选项
A、12
b<CR>
B、12
b<CR>
C、12,a,34,h<CR>
D、12a34h<CR>
答案
D
解析
存输入多个数据时,若格式控制串中无非格式字符,则认为所有输入的字符均为有效字符。所以应按选项D的顺序输入数据。
转载请注明原文地址:https://kaotiyun.com/show/9otp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
在软件设计中,不属于过程设计工具的是
关系模型中的关系模式至少应是()。
设有定义:chars[81];inti=0;以下不能将一行(不超过80个字符)带有空格的字符串正确读入的语句或语句组是while((s[i++]=getchar())!=’\n’);s[i]=’\0’;
有以下程序:#include<stdio.h>main(){FILE*f;f=fopen("filea.txt","w");fprintf(f,"abc");fclose(f);}若文本文件filea.txt中原有内容为hello,则运
若fp已定义为指向某文件的指针,且没有读到该文件的末尾,则C语言函数feof(fp)的函数返同值是
以下选项中不属于C语言程序运算符的是
结构化程序设计中,下面对goto语句使用描述正确的是
以下不能用于描述算法的是()。
算法的有穷性是指
结构化程序由三种基本结构组成,三种基本结构组成的算法
随机试题
某资源联合开采企业为增值税一般纳税人,2020年8月生产经营情况如下:(1)专门开采天然气6000立方米,开采原煤450万吨,采煤过程中因安全生产抽采的天然气350立方米。(2)销售开采的原煤200万吨,取得不含税销售额24500万元,另取得优质服务费
生物体内许多重要的生物活性物质是由氨基酸衍生而来。苯丙氨酸、()等氨基酸是甲状腺激素、肾上腺素和去甲。肾上腺素等激素的前体。色氨酸还是动物体内合成少量维生素B5的原料
患者,女,25岁。月经初潮迟至,婚后日久不孕,耳鸣,手足心热,心烦少寐,便秘溲黄;舌红少苔,脉细数。激素测定:促黄体生成素35.6mIU/L,卵泡刺激素10.2IU/L,睾酮4.9nmol/L。彩超:右侧卵巢大小为3.3cm×3.2cm,其内可探及18
【2013年真题】关于强矩阵组织形式的说法,正确的有()。
证券公司从事介绍业务,与期货公司签订的书面委托协议应载明的事项不包括()。
中国古代读书人为了实现“朝为田舍郎,暮登天子堂”的理想,最佳途径应该是()
公开工作是指直接以公安机关的名义和人民警察的身份,采取被对方了解、认识直至使对方配合的方法和措施开展的工作。( )
下表列出了固体、液体、气体之间的转化,其中①②③④对应正确的是:
在数据库系统的组织结构中,把概念数据库与物理数据库联系起来的映射是()。
Nomatterwhereyou’regoing,airtravelisanessentialpartofyourtrip.Haveyoueverexperiencedairtravel?Maybeit’sfun
最新回复
(
0
)