3下列程序的运行结果为( ) #include<stdio.h> main() struc tdate int year,month,day; )today; printf("%d\n",sizeof(struct date)); A.8B.6C.10D.12 4以下程序的运行结果是( )。 #include <stdio.h> main() st,uct date int year,month,day;today; printf("%d\n",sizeof(struct date))...
2以下程序的运行结果是 #include"stdio.h" main() struct date int year,month,day;today; printf("%d\n",sizeof(struct date)); A.6B.8C.10D.12 3下列程序的运行结果为( ) #include<stdio.h> main() struc tdate int year,month,day; )today; printf("%d\n",sizeof(struct date)); A) 8...
#include main() stmct date int year,month,day; today; primf("%d\n",sizeof(struct date));A 8B 6C 10D 12分值: 2 2以下程序的运行结果是 #include"stdio.h" main() struct date int year,month,day;today; printf("%d\n",sizeof(struct date)); A.6B.8C.10D.12 3下列程序的运行结果...
#include main() stmct date int year,month,day; today; primf("%d\n",sizeof(struct date));A 8B 6C 10D 12分值: 2 2以下程序的运行结果是 #include"stdio.h" main() struct date int year,month,day;today; printf("%d\n",sizeof(struct date)); A.6B.8C.10D.12 3下列程序的运行结果...
int day; int year; }today,yesterday 2.结构变量 struct date today; 定义结构变量,之后可以使用结构体中的 3.结构成员初始化 date.today={07,31,2014} date.yesterday={.month=7,.year=2014} //没给的值输出为0 也可以通过scanf来输入 scanf("%d",&yesterday.month); ...
int year; int month; int day; }; pdate = &today; 通过结构变量today访问其成员的操作,也可以用等价的指针形式表示: today.year = 2001; 等价于 (*pdate).year = 2001; 由于运算符"*"的优先级比运算符"."的优先级低,所以必须有"( )"将*pdate括起来。若省去括号,则含义就变成了"*(pdate.year)...
百度试题 结果1 题目#include<;stdio.h>;struct date{int year;int month;int day;};int main(){struct date today;printf("%d\n",sizeof(struct date));return 0;}A 6B 8C 10D 12 相关知识点: 试题来源: 解析 D 反馈 收藏
下列程序的运行结果为( )。 #include main() { struct date {int year ,month,day; }today; printf("%dn" ,sizeof(struct date)); } 试题预览 下列程序的运行结果为( )。 #include main() { struct date {int year ,month,day; }today; printf("%dn" ,sizeof(struct date)); } ...
最后一天intmain(void){struct date today,tomorrow;printf("年-月-日\n");scanf("%d %d %d",&today.year,&today.month,&today.day);//前面两个判断 是否此月最后一天 是否此年此月最后一天if(today.day==number(today)&&today.month!=12){//首月1号tomorrow.day=1;tomorrow.month=today.month+1;...
day =today.day+1; tomorrow.month = today.month; tomorrow.year = today.year; } printf("明天是%d-%d-%d\n", tomorrow.year, tomorrow.month, tomorrow.day); return 0; } int number(struct date c)//这里的形参接收的today结构体数据 { int day; const int a[12] = { 31,28,31,30,31,30...