【单选题】【消耗次数:1】
若有char ch;利用getchar(ch);语句将字符“A”输入给变量ch,则输入方式()是正确的。
A↙
65↙
\041↙
\101↙
参考答案:
复制
纠错
相关题目
【单选题】 执行C程序段char ch=’a’;ch=(ch>=’a’&&ch<=’z’?(ch-32):ch;后,变量ch的值为()。
①  ‘A’
②  ‘a’
③  ‘z’
④  ‘Z’
【简答题】 输入一个字符,如果是大写字母,则把其变成小写字母;如果是小写字母,则变成大写字母;其它字符不变。请在()内填入缺省的内容。main( ) { char scanf(“%c”, if ([填空1]) ch=ch+32; else if(ch=’a’ch=‘z’) ([填空2]);printf(”%c\n”,ch); }
【单选题】 若ch为char型变量,k为int型变量(已知字符a的ASCII十进制代码为97), 则以下程序段的执行结果是(). ch=a; k=12; printf(%x,%o,,ch,ch); printf(k=%%%d\n,k);
①  因变量类型与格式描述符的类型不匹配,输出无定值
②  输出项与格式描述符个数不符,输出为零值或不定值
③  61,141,k=%12
④  61,141,k=%d
【简答题】 输入一个字符,如果是大写字母,则把其变成小写字母;如果是小写字母,则变成大写字母;其它字符不变。请在补充完整缺省的内容。main( ) { char scanf(“%c”, if (A=ch chZ) [填空1]; else if([填空2]) ch=ch-32;printf(”%c\n”,ch); }
【单选题】 设有如下说明语句:typedefstruct{intn;char*ch;}PER;则PER被定义为:()
①  结构变量
②  结构数组
③  结构体指针
④  结构体类型名
【单选题】 运行以下程序,从键盘上输入china# #includevoid main() { int v1=0,v2=0; char ch; while((ch=getchar())!=#) switch(ch) { case a: case h: default: v1++; case 0:v2++; } printf(%d,%d\n,v1,v2); } 运行结果( )。
①  2,2
②  3,3
③  4,4
④  5,5
【单选题】 已知charch=A;且表达式ch=(ch>=A&&ch<=Z)?(ch32)::ch 的值是()
①  A
②  a
③  Z
④  出错
【单选题】 CH3CH=CHCH3与CH3CH2CH=CH2 是什么异构体?
①  碳架异构
②  位置异构
③  官能团异构
④  互变异构
【单选题】 已知charch=‘A’,且表达式:ch=(ch>=‘A’&&ch<=‘Z’)?(ch32):ch,该表达式的值是()
①  A
②  a
③  z
④  Z
【单选题】 下述程序的运行结果( )。 #includevoid main() { char ch; int i=0; for(ch=achzch++) { printf(%c ,ch); if(i%10==0) printf(\n } printf(\n }
①  a b c d e f g h i j k l m n o p q r s t u v w x y z
②  a b c d e f g h i j k l m n o p q r s t u v w x y z
③  a b c d e f g h i j k l m n o p q r s t u v w x y z
④  a b c d e f g h i j k l m n o p q r s t u v w x y z
随机题目
【单选题】 At the bus stop _____ a soldier and two young people on their way to North Carolina.
①  were
②  was
③  is
④  waiting
【单选题】 12.Among these articles, which do you think are most ______ to interest our students?
①  competent
②  likely
③  awkward
④  unexpected
【单选题】 2.I couldn’t understand why he pretended ______ in the bookstore.
①  to see me not
②  not to see me
③  not see me
④  to see not me
【单选题】 In the meantime, the question facing business is whether such research is _____ the costs.
①  worth
②  worth of
③  worthy
④  worthwhile
【单选题】 7. They hope to_________the source of the infection.
①  track down
②  look down
③  look at
④  back down
【单选题】 1.The movie star ______ with your sister, didn’t he?
①  was used to dance
②  used to dancing
③  used to dance
④  was used to dancing
【单选题】 7.We had warned him________the danger but he turned a deaf ear to our warning.
①  to
②  along
③  in
④  of
【单选题】 10.It’s a highly___________infection.
①  connect
②  infect
③  infected
④  contagious
【单选题】 8. Herson didnotseemto_____anyimportanceto what she had said.
①  stick
②  notice
③  attach
④  remind
【单选题】 13.Don’t ______ to let me know if there’s anything I can do for you.
①  thrill
②  hesitate
③  reject
④  puzzle