首页/ 题库 / [判断题]DATE()+YEAR(DATE())是的答案

DATE()+YEAR(DATE())是一个错误的表达式。

判断题
2022-03-25 17:16
A、对
B、错
查看答案

正确答案

试题解析
DATE()返回的是日期型数据;YEAR()函数返回的是日期中的年份,但是一个数值型数据,所以可以和日期数据相加,这时代表的是天数。

标签: 大学试题 工学
感兴趣题目
以下程序的运行结果是( )。 #include <stdio.h> main() { st,uct date {int year,month,day;}today; printf("%d ",sizeof(struct date)); }
有以下程序: #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+( iht 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 dl( 6, 20, 2004 ), d2; d2 = dt + 20; d2.disp(); return 0; } 执行后的输出结果是( )。
有以下程序: classDate {public: Date(inty,intm,intd); {year=Y; month=m; day=d;} Date(inty=2000) {year=y; month=10; day=1;} Date(Date&d) {year=d.year; month=d.month; day=d.day;} voidprint() {cout<<year<<"."<<month<"."<< day<<endl;} private: intyear,month,day;}; Datefun(Dated) {Datetemp; temp=d; returntemp;} intmain() {Datedatel(2000,1,1),date2(0,0,O); Datedate3(date1); date2=fun(date3); return0;} 程序执行时,Date类的复制构造函数被调用的次数是( )。
有以下程序: classDate { public: Date(inty,intm,intd); { year=Y: month=m; day=d; } Date(inty=2000) { year=y; month=10; day=1; } Date(Date&d){ year=d.year; month=d.month; day=d.day; } voidprint( ) { cout<<year<<"."<(month<<"."<<day<<endl; } private: intyear,month,day; }; Datefun(Dated) { Datetemp; temp=d; returntemp; } intmain( ) { Datedatel(2000,1,1),date2(0,0,0); Datedate3(datel); date2=fun(date3); return0; } 程序执行时,Date类的拷贝构造函数被调用的次数是( )。
有以下程序: Class Date { public: Date(int y,int m,mt 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 prin
DATE的函数值等于YEAR()函数、MONTH()函数、DAY()函数的函数值之和。
When the renewal verification is completed more than three months before the expiry date of the existing Document of Compliance or Safety Management Certificate, the new Document of Compliance or the new Safety Management Certificate should be valid from the date of () for a period not exceeding five years.
{DATE\@"yyyy-M-d"}中的DATE是()。
{DATE/@"yyyy-M-d"}中的DATE是()。
DATE()+YEAR(DATE())是一个错误的表达式。
设DATE=’03/12/20’,表达式&DATE的结果的数据类型是()。
The insert point or( )show you where can enter date next .
相关题目
In a business letter,the date line consists of the month,day and year.which is the right business style of date line ?
In a business letter,the date line consists of the month,day and year.which is the right business style of date line ?
YEAR(DATE( )值的类型是
以下程序的运行结果为( )#include main(){struct date{int year,month,day;}today; printf(%d ,sizeof(struct date));}
6  命令vartype(year(date()))的执行结果是
As per UCP600, the words “to”, “till”, “from”, “between” when used to determine a period of shipment include the date or dates mentioned, the words “before” and “after” exclude the date mentioned. ()
表达式STR(YEAR(DATE())+10)的数据类型为()。
VisualFoxPro的表达式LEN(DTOC(DATE()))+DATE()的类型是()。
有以下程序: 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<<“.”<<mo
设有以下定义: 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));
设有以下说明和定义: typedef union {long i int k[5];char c;}DATE; struct date {int cat;DATE cow;double dog;}too; DATE max; 则下列语句的执行结果是 ( ) printf("%d",sizeof(struet date)+sizeof(max));
有以下程序: 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 = a.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 date 1 (2000,1,1),date2(0,0,0); Date date3(date 1); date2 = fun(date3); return 0; } 程序执行时,Date 类的拷贝构造函数被调用的次数是
设有如下变量声明Dimtimel As Date,为变量timel正确赋值的表达式是( )。
设有如下变量声明: Dim TestDate As Date 为变量TestDate正确赋值的表达式是( )。
设有如下变量声明: Dim Test Date AS Date 为变量Test Date正确赋值的表达式是( )。
设有如下变量声明:Dim TestDate As Date,为变量TestDate正确赋值的表达式是( )。
有以下程序 #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; } 执行后的输出结果是
有以下程序 #include<iostream> using namespace std; static int days []={31,28,31,30,31,30,3l,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; retrn dt; } }; int main() { date d1(6,20,2004),d2; d2=d1+20; d2.disp(); return 0; } 执行后的输出结果是
有以下程序 #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; } 执行后的输出结果是
有以下程序: 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<<endl; } private: int year,month,day; }; Date fun(Date d) { Date temp; temp = d; resurn temp; } int main () { Date date1 (2000,1,1),date2 (0,0,0); Date date3 (date1); date2 = fun(date3); return 0; } 程序执行时,Date类的拷贝构造函数被调用的次数是
广告位招租WX:84302438

免费的网站请分享给朋友吧