网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设ch是char型变量,其值为A,且有表达式:ch=(ch>='A'&&ch<='Z')?(ch+32):ch。该表达式的值是______。
A.A
B.a
C.Z
D.z
参考答案
更多 “ 设ch是char型变量,其值为A,且有表达式:ch=(ch>='A'ch<='Z')?(ch+32):ch。该表达式的值是______。A.AB.aC.ZD.z ” 相关考题
考题
有下列程序 program test(input,output); var s:integer; ch:char; count:array[‘a‘..‘z‘]of integer; begin for ch:=‘a‘to‘z‘do count[ch]:=0; read(ch); while not eoln do begin if(ch>=‘a‘)and(chx[5])and(x[c]/c0) or not(x[a+b]>(a+b))的值是( )。AtrueBfalseC0D1
考题
下列程序运行时,若输入labced12df回车 输出结果为【10】#include stdio.hmain( ){char a =0,ch;while((ch=getchar())!=’\n’){if(a2!=0(ch’a’ch=’z’)) ch=ch-‘a’+’A’;a++;putchar(ch);}printf(“\n”);}
考题
判断字符型变量ch是否为大写英文字母,应使用表达式A.ch>='A' ch='Z'C.
判断字符型变量ch是否为大写英文字母,应使用表达式A.ch>='A' ch<='Z'B.ch<='A'||ch>='Z'C.'A'<=ch<='Z'D.ch>='A' ch<='Z'
考题
在执行以下程序时,如果从键盘上输入ABCdef,则输出为______。include main(){char
在执行以下程序时,如果从键盘上输入ABCdef<回车>,则输出为______。#include <stdio.h>main (){ char ch; while ((ch=getchar())!="\n") { if (ch>='A' ch<='B')ch=ch+32; else if (ch>='a' ch<='z')ch=ch-32; printf("%c",ch); } printf("\n");}A.ABCdefB.abcDEFC.abcD.DEF
考题
判断字符型变量ch是否为大写英文字母,应使用表达式______ .A.ch>='A' ch<='Z'B.ch:='A'||ch>='Z'C.'A'<=ch<='Z'D.ch>='A' ch<='Z'
考题
下列程序运行时,若输入labcedf2df输出结果为【】。 include main(){char a=0,ch; wh
下列程序运行时,若输入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");}
考题
下面程序中,若从键盘输入大写字母C,则程序的输出结果是______。 import java.io.*; public class Test{ public static void main(String args[ ]){ int ch=0; System.out.println("Please input a character:"); try{ ch=System.in.read( ); char ch_A='A',ch_Z='Z'; int delta_c=(int)ch_A+(int)ch_Z-ch; System.Out.println("the encoded character is:"+(char)delta_C); }catch(IOException e){e.printStackTrace( );} } }A.CB.YC.XD.字母C的ASCII码的整型值
考题
在执行以下程序时,如果从键盘上输入:ABCdef,则输出为______。 main() { char ch; while((ch
在执行以下程序时,如果从键盘上输入:ABCdef<回车>,则输出为______。 main() { char ch; while((ch=getchar())!='\n') { if(ch>='A' ch<='Z') ch=ch+32; else if(ch>='a'ch<='2')ch=ch-32; printf("%c",ch); } printf("\n"); }A.ABCdefB.abcDEFC.abcD.DEF
考题
以下程序的输出结果是 char cchar(char ch) { if(ch>='A'ch<='Z') ch=ch-'A'+'a'; return ch; } main ( ) { char s [] = "ABC+abc=defDEF" , *p=s; while (*p) { *p=cchar(*p); p++; } printf { "%$\n", s); }A.abc+ABC=DEFdefB.abc+abc=defdefC.abcABCDEFdefD.abcabcdefdef
考题
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是( )。A.switch(x+y){……}B.switch(ch+1){……}C.switch ch{……}D.switch(a+b):{……}
考题
Which two valid declarations of a char? ()A、 Char ch = “a”;B、 Char ch = ‘“‘ ‘;C、 Char ch = ‘cafe‘;D、 Char ch = “cafe”;E、 Char ch = ‘“ucafe‘;F、 Char ch = ‘“u10100‘;G、 Char ch = (char) true;
考题
下列语句应将小写字母转换为大写字母,其中正确的是()。A、if(ch=’a’ch=’z’)ch=ch-32;B、if(ch=’a’ch=’z’)ch=ch-32;C、ch=(ch=’a’ch=’z’)?ch-32:’’;D、ch=(ch’a’ch’z’)?ch-32:ch;
考题
设Ch中存放的是长度为1的字符串,与AT(CH,′123450′)0等价的表达式是().A、CH$′123450′B、AT(CH,′12345′)=0C、′123450′$CHD、′123450′=CH
考题
判断char型变量ch是否为小写字母的正确表达式是()A、’a’=ch=’z’B、(ch=’a’)(ch=’z’)C、(ch=’a’)(ch=’z’)D、(’a’=ch)AND(’z’=ch)
考题
多选题设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是()。Aswitch(x+y){……}Bswitch(ch+1){……}Cswitch ch{……}Dswitch(a+b){……}
考题
单选题设Ch中存放的是长度为1的字符串,与AT(CH,′123450′)0等价的表达式是().A
CH$′123450′B
AT(CH,′12345′)=0C
′123450′$CHD
′123450′=CH
热门标签
最新试卷