如果定义有short,s;byte,b;char,c,则表达式s*b+c的类型为()
第1题:
自动类型转换是按优先关系从低级数据转换成高级数据,规定的优先次序是( )。
A.byte, short, char→int→long→float→double
B.float→int→long→byte, short, char→double
C.int→long→float→double→byte, short, char
D.double→int→float→long→byte, short, char
第2题:
若有定义语句:char s[10]="1234567\0\0";,则strlen(s)的值是______。
A.7
B.8
C.9
D.10
第3题:
设有定义:char s[12]={"hello"},则cout<<strlen(s)的输出是 ______。
A.5
B.6
C.11
D.12
第4题:
若有以下定义: char s[20]="programming",*ps=s; 则不能代表字符o的表达式是_______。
A.ps+2
B.s[2]
C.ps[2]
D.ps+=2,*ps
第5题:
若有byte b=6;short s=20;则表达式b+s的值的类型是()。
A.byte
B.int
C.short
D.char
第6题:
若有float f=2.6f;short s=20;则表达式f+s的值的类型是()。
A.float
B.short
C.int
D.byte
第7题:
A.byte, short, int, long, float, double
B.boolean, byte, short, char, int, long, float, double
C.byte, short, char, int, long, float, double
D.byte, short, char
E.int, long, float, double
第8题:
下面哪个语句是正确的()
第9题:
如果定义有double,x;float,y;int,m,则表达式x*y-m的类型为()
第10题:
若有定义char s[10];则在下面表达式中不表示s[1]的地址的是()
第11题:
若有floatf=2.6f;shorts=20;则表达式f+s的值的类型是()
第12题:
BY
BT
YT
YE
第13题:
有以下程序(说明:字母A的ASCIl码值是65): #include<stdio.h> void fun(char*s) {while(*s) {if(*s%2)printf("%C",*s); s++; } } main( ) {char a[]="BYTE"; 。 Fun(a);printf("\n"); } 程序运行后的输出结果是( )。
A.BY
B.BT
C.YT
D.YE
第14题:
有定义语句int b;char c[10];,则正确的输入语句是 ______。
A.scallf("%d%s",&b,&c);
B.scallf("%d %s",&b,c);
C.scanf("%d %s",b,c)
D.scanf("%d%s",b,&c);
第15题:
有以下程序(说明:字母A的ASCII码值是65)
#include<stdio.h>
void fun(char*S)
{while(*s)
{if(*s%2)printf(“%c”,*s);
S++;
}
}
main()
{char a[]=“BYTE”:
fun(a);printf(“\n”);
}
程序运行后的输出结果是
A.BY
B.BT
C.YT
D.YE
第16题:
自动类型转换规定的优先次序是( )。
A.short,byte,char→long→int→float→double
B.short,byte,char→int→long―float→double
C.byte,short,char→long→int→float→double
D.byte,short,char→int→long→float→double
第17题:
若有char c='8';short s=20;则表达式c+s的值的类型是()。
A.char
B.short
C.int
D.byte
第18题:
设有定义语句“char s[]="123";”,则表达式“s[3]”的值是 ( )
A.’1’
B.’3’
C.0
D.语法出错
第19题:
串的操作函数str定义为: int str(char*s){ char*p=s; while(*p!=’\0')p++; return p=s; } 则str("abcde")的返回值是 ( )
A.3
B.4
C.5
D.6
第20题:
若有charc=’8’;shorts=20;则表达式c+s的值的类型是()
第21题:
若有byteb=6;shorts=20;则表达式b+s的值的类型是()
第22题:
若有定义:char s[ ]="china"; 则Turbo C系统为数组s开辟()个字节的内存单元.
第23题:
char
short
int
byte