A、struct student { int number; char name[20]; char sex; int year; int month; int day; } s; year = 1984; month = 11; day = 11;
B、struct student { int number; char name[20]; char sex; } s; struct { int year; int month; int day; } birth; birth.year = 1984; birth.month = 11; birth.day = 11;
C、struct student { int number; char name[20]; char sex; struct { int year; int month; int day; } birth; } s; s.year = 1984; s.month = 11; s.day = 11;
D、struct student { int number; char name[20]; char sex; struct { int year; int month; int day; } birth; } s; s.birth.year = 1984; s.birth.month = 11; s.birth.day = 11;
第3题
定义各种数据类型的变量,按要求为它们赋值,并打印输出。
publicclassTypeExchange{
publicstaticvoidmain(String[]args){
//将一个整型字面值67832赋值给char类型变量c
//并将c的值输出
//定义一个整型变量n,值为65
//定义一个字符型变量c1,赋值为n,并输出c1的值
//定义一个长整型变量l,值为987654321
//定义一个整型变量i,赋值为l,并输出i的值
//定义一个float类型变量f,将变量l的值赋值给f,并输出f的值
//将float的值f,重新赋值给变量l,并输出l的值}}
第4题
设变量x为noat型且已赋值,则以下语句中能将x中的数值保留到小数点后两位,并将第3位四舍五入的是()。
A.X=X*100+0.5/100.0;
B.x=(x*100+0.5)/100.0;
C.x=(int)(x*100+0.5)/100.0;
D.x=(x/100+0.5)*100.0;
第5题
A.定义变量,变量赋值,变量计算,输出变量结果
B.变量赋值,变量计算,定义变量,输出变量结果
C.定义变量,变量计算,变量赋值,输出变量结果
D.定义变量,变量计算,输出变量结果,变量赋值
第8题
指令“COUNT EQU CX”的含义是()。
A.定义变量COUNT,并赋值
B.定义常量COUNT,并赋值
C.定义变量CX,并赋值
D.定义COUNT为CX的同义语
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!