网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

在32位机,VC编译器下,以下程序的运行结果是________________ #include <stdio.h> int main() { struct date { int year,month,day;}today; printf("%dn",sizeof(struct date)); }


参考答案和解析
4481
更多 “在32位机,VC编译器下,以下程序的运行结果是________________ #include <stdio.h> int main() { struct date { int year,month,day;}today; printf("%dn",sizeof(struct date)); }” 相关考题
考题 下列程序的运行结果是()。 include main() {stmct date {int year,month,day; }today; 下列程序的运行结果是( )。#include<stdio.h>main(){stmct date{int year,month,day;}today;primf("%d\n",sizeof(struct date));}A.8B.6C.10D.12

考题 下列程序的运行结果为() include main() {struc tdate {int year,month,day; )today; 下列程序的运行结果为( )#include<stdio.h>main(){ struc tdate{int year,month,day;)today;printf("%d\n",sizeof(struct date));}A.8B.6C.10D.12

考题 有以下程序:class Date{public:Date(int y,int m,int d);{year=y;month=mday=d;}Date(int y=2000){year=y;month=10;day=1;}Date(Date d){year=d.year;month=d.month;day=d.day;}void print( ){cout<<year<<"."<<month<<"."<<day<<endl;}private:int year,month,day;};Date fun(Date d){Date temp;temp=d;return temp;}int main( ){Date datel(2000,1,1),date2(0,0,0);Date date3(datel);date2=fun(date3);return 0;}程序执行时,Date类的拷贝构造函数被调用的次数是A.2B.3C.4D.5

考题 以下程序的运行结果是#include "stdio.h"main(){struct date{int year,month,day;}today;printf("%d\n",sizeof(struct date));}A.6B.8C.10D.12

考题 以下程序的输出结果是()includemain(){struct stru{int a,b:char c[6];}:printf("%d\n 以下程序的输出结果是 ( ) #include<stdio.h> main() {struct stru{int a,b: char c[6]; }: printf("%d\n",sizeof(stru)), }A.2B.4C.8D.10

考题 有以下程序: class Date { public: Date(int y,int m,int D) ; { year =y; month=m; day=d; } Date(int y=2000) { year=y; month=10; day=1; } Date(Date D) { year=d.year; month=d.month; day=d.day; } void print () { cout<<year<<"."<<month<<"."<<day<<end1; } private: int year,month,day; }; Date fun(Date D) { Date temp; temp=d; return temp; } int main() { Date date1(2000,1,1),date2(0,0,0); Date date3(date1); date2=fun(date3); return 0; } 程序执行时,Date类的拷贝构造函数被调用的次数是A.2B.3C.4D.5

考题 下面结构体的定义语句中,不正确的是______。A.structdate { int month; int day; int year; } Struct date datel;B.stmctdate { intmonth; int day; int year; } datel;C.struct { int month; int day; int year; } date 1;D.#define DATE stmct date DATE { int month; int day; int year; }datel;

考题 有以下程序include using namespace std;static int days[]= { 31,28,31,30,31,30,31 有以下程序 #include <iostream> using namespace std; static int days[]= { 31,28,31,30,31,30,31,31,30,31,30,31 }; class date { private: int month, day, year; public: date( int m, int d, int y ) { month = m; day = d; year = y; } date() {} void disp() { cout<<year<<"-"<<month<<"-"<<day<<end1; } date operator+( int day ) { date dt = *this; day+= dt.day; while ( day > days[dt.month - 1 ] ) { day -= days[ dt.month - 1 ]; if ( ++dt.month == 13 ) { dt.month = 1; dt.year++; } } dt.day = day; return dt; }; int main() { date d1( 6, 20, 2004 ), d2; d2: d1 + 20; d2.disp(); return 0; } 执行后的输出结果是A.2004-7-10B.2004-6-20C.2004-7-20D.程序编译时出错

考题 下列程序的输出结果是()。includemain(){struct st{int y,x,z;};union{long i; int j; 下列程序的输出结果是( )。 #include<stdio.h> main() { struct st { int y,x,z; }; union { long i; int j; char k; }un; printf("%d,%d\n",sizeof(struct st),sizeof(un)); }A.6,2B.6,4C.8,4D.8,6

考题 设有以下说明和定义:typedef union {long i; int k[5]; char c;} DATE;struct data { int cat; DATE cow; double dog;} too;DATE max;则语句 printf("%d",sizeof(struct date)+sizeof(max));的执行结果是:___52____

考题 下列程序的输出结果是( )。 include main() { struct st { int y,x,z; }; union {long 下列程序的输出结果是( )。 #include <stdio.h> main() { struct st { int y,x,z; }; union { long i; int j; char k; } un; printf("%d,%d\n",sizeof(struct st),sizeof(un)); }A.6, 2B.6, 4C.8, 4D.8, 6

考题 有以下程序include usingnamespacestd;static int days []={31,28.31,30,31,30,31,31 有以下程序 #include <iostream> using namespace std; static int days []={31,28.31,30,31,30,31,31,30,31,30,31}; class date { private: int month, day, year: public: date (int m, int d, int y { month = m; day = d; year = y; } date{} {} void disp {) { cout <<year<<" - "<<month<< "- "<<day<<end1; } date operator+(int day) { date dt = *this: day += dt.day; while { day > days[ dt.month - 1 ] ) { day -= tays[ dt.month - 1 ]; if ( ++dt.month == 13 { dt.month = 1; dt.yeare++; } } dr. day = day; return dt; } }; int main() { date d1( 6, 20, 2004 ), d2; d2.= d1 + 20; d2.disp (); return 0; } 执行后的输出结果是A.2004-7-10B.2004-6-20C.2004-7-20D.程序编译时出错

考题 有以下程序#include "stdio.h"main(){ struct date { int number; float fenzhi; char name; }stu; printf("%d\n",sizeof(stu));} 程序的运行结果是A.3 B.5C.7 D.8

考题 以下程序的输出结果是【】。 include main() {struct stru {int a; float b; char d[4]; } 以下程序的输出结果是【 】。include<stdio.h>main(){ struct stru{ int a;float b;char d[4];};printf("%d\n",sizeof(struct stru));}

考题 有以下程序#include "stdio.h"main(){ struct date {int year,month,day;}today; printf("%d\n",sizeof(struct date));}程序的运行结果是A.6 B.8C.12 D.10

考题 设有以下说明和定义:includeVoid main() {typedef union{long i; int k[5]; char 设有以下说明和定义:#include<iostream. h>Void main() {typedef union{long i; int k[5]; char c;}DATE;struct date{iNt cat; DATE cow; double. dog;}too;DATE max;则下列语句的执行结果是( )。cout<<(sizeof(struct date)+sizeof(max))<<end1;}A.26B.52C.18D.8

考题 下列程序的运行结果为( )。 #includestdio.h main { struct date {int year,month,day; }today; printf("%d\n",sizeof(struct date)); }A.8B.6C.10D.12

考题 下列程序的运行结果为()。include main(){stmct date {int year,month,day; }today; pr 下列程序的运行结果为( )。 #include <stdio.h> main() { stmct date {int year,month,day; }today; printf("%d\n",sizeof(struct date)); }A.8B.6C.10D.12

考题 下列程序的运行结果为( )。#includestdio.hmain{ struct date{int year,month,day;}today;printf(%d\n,sizeof(struct date));}A.8B.6C.10D.12

考题 设有以下说明和定义:includeVoid main() {typedef union{long i; int k[5]; char 设有以下说明和定义: #include<iostream. h> Void main() { typedef union { long i; int k[5]; char c; } DATE; struct date {int cat; DATE cow; double dog; }too; DATE max; cout<<(sizeof(struct date)+sizeof(max))<<end1;}A.26B.52C.18D.8

考题 设有以下说明和定义:typedef union{ long i;int k[5];char c; } DATE;struct date{ int cat;DATE cow;double dog; }too;DATE max;则下列语句的执行结果是______。printf("%d",sizeof (struct date) +sizeof(max));A.26B.30C.18D.8

考题 设有以下定义: typedef union {long i;int k[5];char c,}DATE, struct date {int cat;DATE cow;double dog;}too; DATE max; 则下列语句的执行结果是( ) printf("%d",stzeof(struct date)+sizeof(max));A.25B.30C.18D.8

考题 以下程序设计功能是:将结构体变量time 中的内容写到文件中。include using namespace s 以下程序设计功能是:将结构体变量time 中的内容写到文件中。include <iostream>using namespace std;struct date{int year;int month;int day;}int main ( ){date time = { 2005, 1, 1 };ofstream outdate;outdate.open( "d:\\date.txt", ios :: binary );outdate.write(____________, sizeof( tt ) );outdate.close();return 0;}则程序中空白处应该填入的语句为【 】。

考题 有以下程序: include struct NODE { int num; struct NODE*next; }; main() { struct 有以下程序:#include <stdlib.h>struct NODE{ int num; struct NODE *next; };main(){ struct NODE *p,*q,*r;p=(struct NODE*)malloc(sizeof(struct NODE));q=(struct NODE*)mallloc(sizeof(struct NODE));r=(struct NODE*)malloc(sizeof(struct NODE));p->num=10;q->num=20; r->num=30;p->next=q;q->next=r;printf("%d\n",p->num+q->next->num);}程序运行后的输出结果是( )。A.10B.20C.30D.40

考题 下列程序的运行结果为()。includemain(){struct date {int year,month,day; }today; pr 下列程序的运行结果为( )。 #include<stdio.h> main() { struct date {int year,month,day; }today; printf("%d\n",sizeof(struct date)); }A.8B.6C.10D.12

考题 以下程序的输出结果是() includemain(){ union un{int i; long k; char c;};struct by 以下程序的输出结果是( ) # include<stdio.h> main() { union un{int i; long k; char c; }; struct byte{ int a; long b; union un c; } r; printf("%d\n",sizeof(r)); }A.10B.13C.7D.8

考题 有以下程序 include struct NODE {int num;struct NODE*next;} main() {struct NODE 有以下程序#include<stdlib.h>struct NODE{int num;struct NODE*next;}main(){struct NODE *P,*q,*r;p=(struct NODE *)malloc(sizeof(struct NODE));q=(struct NODE *)malloc(sizeof(struet NODE));r=(struct NODE*)malloc(sizeof(struct NODE)):p->num=10;q->num=20;r->num=30;p->next=q;q->next=r;printf("%d\n",p->num+q->next->num):}程序运行后的输出结果是( )A.10B.20C.30D.40

考题 以下程序的运行结果是()。includemain(){st,uct date {int year,month,day;}today; pri 以下程序的运行结果是( )。 #include <stdio.h> main() { st,uct date {int year,month,day;}today; printf("%d\n",sizeof(struct date)); }A.6B.8C.10D.12