阅读以下程序includevoid main(){charline[10];in>>line;cout 阅读以下程序 #include<iostream.h> void main() { charline[10]; in>>line; cout<<line<<endl; } 如运行时输入This is an example.<CR>,则程序的输出结果是( )。A.ThisB.This isC.This is aD.This is an example.
阅读以下程序includevoid main(){charline[10];in>>line;cout<
阅读以下程序 #include<iostream.h> void main() { charline[10]; in>>line; cout<<line<<endl; } 如运行时输入This is an example.<CR>,则程序的输出结果是( )。
A.This
B.This is
C.This is a
D.This is an example.
相关考题:
阅读以下程序 include void main( ) { char line[10]; cin>>line; cout 阅读以下程序#include<iostream.h>void main( ){char line[10];cin>>line;cout<<line<<endl;}如运行时输入This is example.<CR>,则程序的输出结果是A.ThisB.This isC.This is aD.This is an example.
阅读下列C++程序和程序说明,将应填入(n)处的字句写在对应栏内。【说明】Point是平面坐标系上的点类,Line是从Point派生出来的直线类。include <iostream.h>class Point{public:Point (int x, int y) ;Point (Point p) ;~Point();void set (double x, double y) ;void print();private:double X,Y;};Point::Point (int x, int y) //Point 构造函数{X=x; Y=y; }Point::Point ( (1) ) //Point 拷贝构造函数{X=p.X; Y=p.Y;}void Point::set (double x, double y){X=x; Y=y; }void Point::print(){cout<<' ('<<X<<","<<Y<<") "<<endl; }Point::~Point(){cout<<"Point 的析构函数被调用! "<<endl;class Line: public Point{public:Line (int x, int y, int k) ;Line (Line s) ;~Line();void set (double x, double y, double k)void print();private:double K;};(2)//Line 构造函数实现{ K=k;}(3)//Line 拷贝构造函数实现{K=s.K;}void Line::set (double x, double y, double k){ (4);K=k;}void Line::print(){cout<<" 直线经过点";(5);cout<<"斜率为: k="<<K<<endl;}Line: :~Line(){cout<<"Line 析构函数被调用! "<<endl;}void main(){Line 11 (1,1,2) ;11 .print();Linel2 (11) ;12.set (3,2,1) ;12.print();}
下列程序的运行结果是______。include class Base { public: void f(int x){cout 下列程序的运行结果是______。include<iostream.h>class Base{public:void f(int x){cout<<“Base:”<<x<<endl;});class Derived:public Base{public:void f(char*str){cout<<“Derived:”<<str<<endl;}};void main(void){Base*pd=ne
阅读以下程序 includc vold main() { Char line[10]; cin>>line; 阅读以下程序 #includc<iostream.h> vold main() { Char line[10]; cin>>line; cout<<line<<endl; } 如运行时输入This is example.<CR>,则程序的输出结果是A.ThisB.This isC.This is aD.This is an example.
写出下列程序的运行结果【】。include .include include void ma 写出下列程序的运行结果【 】。include <iostream.h>.include <fstream.h>include <stdlib.h>void main(){fstream outfile, infile;outfile.open("data.clat", ios:: out);if(!outfile){cout<<"Can't open the file."<<end1;abort();}outfile<<" 1234567890"<<end1;outfile<<"aaaaaaaaa"<<end1;outfile<<"**********"<<end1;outfile.close();infile.open("data. dat ", ios:: in);if(!infile){cout<<"Can't open the file."<<end1;abort();}char line[80];int I=0;while(!infile. eof()){I++;infile.getline(line, sizeof(line));cout<<I<<":"<<line<<end1;}infile.close();}
阅读以下程序 #include(iostream.h voidmain( ) { charline[10]; cinline; cout1ineendl; } 如运行时输入“Thisisanexample.CR”,则程序的输出结果是( )。A.ThisB.ThisisC.ThisisaD.Thisisanexample
当输入“Thank you”时下列程序的输出结果为()。 include include void m 当输入“Thank you”时下列程序的输出结果为( )。 #include<iostream.h> #include<iomanip.h> void main() { char line[80]; cin.getline(line,sizeof(80),'k'); cout<<line; }A.ThaB.Thank youC.ThankD.以上结果都不对
当输入“Thank you”时下列程序的输出结果为()。includeincludevoid mai 当输入“Thank you”时下列程序的输出结果为( )。 #include<<iostream.h> #include<iomanip.h> void main() { char line[80]; cin.getline(line,sizeof(80),'k'); cout<<line; }A.ThaB.Thank youC.ThankD.以上结果都不对
阅读如下程序,输入“3”运行程序,结果为____。 #include <iostream.h> void main() { int i; cin>>i; cout<<i++<<endl; }