网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设有语句 char ch= '101',则变量ch ()。
A.包含一个字符
B.包含3个字符
C.包含4个字符
D.不合法
参考答案和解析
包含一个字符
更多 “设有语句 char ch= '101',则变量ch ()。A.包含一个字符B.包含3个字符C.包含4个字符D.不合法” 相关考题
考题
已知 ch 是字符型变量,下面不正确的赋值语句是 ( ) 。 A)ch = 5 + 9 B) ch= ' a + b '
已知 ch 是字符型变量,下面不正确的赋值语句是 () 。A)ch = 5 + 9B) ch= a + b C) ch = \ 0 D) ch= 7 + 6
考题
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是_________。
A.switch(ch+1){......}B.switch(a+b){......}C.switch(x+y){......}D.switchch{......}
考题
设有以下函数过程 Private Function Fun(a( )As Integer,b As String)As Integer … End Function 若已有变量声明: Dim x(5)As Integer,n As Integer,ch As String 则下面正确的过程调用语句是( )。A.x(O)=Fun(x."ch")B.n=Fun(n.ch)C.CallFun X,"ch"D.n=Fun(x(5),ch)
考题
下列对结构及其变量定义错误的是( )。A.struct My StructB.struct MyStruct{ {int num; int num;char ch; char ch;} }My;C.strutD.struct{ {int num; int num;char ch; char ch;}My; };
考题
设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerEhd Function若已有变量声明:Dim x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是A.x(0)=Fun(x,“ch”)B.n=Fun(n,ch)C.Call Fun x,“ch”D.n=Fun(x(5),ch)
考题
设有以下语句:char ch1,ch2; scanf(”%c%c”,ch1,ch2);若要为变量ch1和ch2分别输入字符A和B,正确的输入形式应该是A)A和B之间用逗号间隔B)A和B之间不能有任何间隔符C)A和B之间可以用回车间隔D)A和B之间用空格间隔
考题
设有以下说明语句: typedef struct { int n; char ch[8]; }PER; 则下面叙述中,正确的是( )。A.PER是结构体变量名B.PER是结构体类型名C.typedef struct是结构体类型D.struct是结构类型名
考题
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,则正确的swith语句是( )。A.switch (x+y) {...}B.switch (ch+1) {...}C.switch ch {...}D.switck (a+b) {...}
考题
若有char ch[10],则下列字符串数组的赋值中不正确的是( )。A.ch="welcome";B.ch[0]='w';C.strcpy(ch,"welcome");D.char ch1[]="welcome";strcpy(ch,ch1);
考题
在执行以下程序时,如果从键盘上输入: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
考题
下列对结构及其变量定义错误的是( )。A.struct My Struct { int num; char ch; }B.struct MyStruct { int num; char ch; }My;C.strut { int num; char ch; }My;D.struct { int num; char ch; };
考题
设有以下函数过程Private Function Fun(a( )As Integer,b As String)As Integer…End Function若已有变量声明:Dim x(5)As Integer,n As Integer,ch As String则下面正确的过程调用语句是( )。A.x(O)=Fun(x.ch)B.n=Fun(n.ch)C.CallFun X,chD.n=Fun(x(5),ch)
考题
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是( )。A.switch(x+y){……}B.switch(ch+1){……}C.switch ch{……}D.switch(a+b):{……}
考题
(23)设有以下函数过程Private Function Fun(a() As Integer, b As String) As Integer...End Function若已有变量声明:Dim x(5)As Integer, n As Integer, ch As String则下面正确的过程调用语句是A)x(o)=Fun(x, "ch")B)n=Fun(n, chC)Call Fun x, "ch"D)n=Fun(x(5), ch)
考题
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、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;
考题
判断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){……}
考题
单选题设有函数定义:void sub(int k,char ch){…}则以下对函数sub的调用语句中,正确的是( )。A
sub(1,97);B
sub(2,'97');C
h=sub(3,'a');D
sub(4,a);
考题
单选题设有以下语句:char ch1,ch2;scanf(%c%c,ch1,ch2);若要为变量ch1和ch2分别输入字符A和B,正确的输入形式应该是( )。A
A和B之间用逗号间隔B
A和B之间不能有任何间隔符C
A和B之间可以用回车间隔D
A和B之间用空格间隔
热门标签
最新试卷