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

题目内容 (请给出正确答案)
下面程序的输出结果是()。includeincludeusing namespace std;class point{p

下面程序的输出结果是( )。 #include<iostream> #include<math.h> using namespace std; class point { private: double x; double y; public: point(double a,double b) { x=a; y=b; } friend double distances(point a,point b); }; double distances(point a,point b) { return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)); } int main() { point p1(1,2); point p2(5,2); cout<<distances(p1,p2)<<end1; return 0; }

A.2

B.4

C.8

D.16


参考答案

更多 “ 下面程序的输出结果是()。includeincludeusing namespace std;class point{p 下面程序的输出结果是( )。 #include<iostream> #include<math.h> using namespace std; class point { private: double x; double y; public: point(double a,double b) { x=a; y=b; } friend double distances(point a,point b); }; double distances(point a,point b) { return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)); } int main() { point p1(1,2); point p2(5,2); cout<<distances(p1,p2)<<end1; return 0; }A.2B.4C.8D.16 ” 相关考题
考题 下面程序的输出结果是【】。include include class point{double x; double y; 下面程序的输出结果是【 】。include <iostream.h>include <math.h>class point{double x;double y;public:point(double a, double b){x=a;y=b;}friend double distance(point a, point b) ;};double distance(point a, point b){return sqrt ((a. x-b.x) * (a. x-b.x)+ (a. y-b. y) * (a. y-b. y) );}void main(){point p1(1,2);point p2(5,2);cout<<distance(p1,p2)<<end1;}

考题 以下程序的输出结果是【】。includevoid main() {int *p;p=new int;*p=200;cout 以下程序的输出结果是【 】。include<iostream. h>void main() {int *p;p=new int;*p=200;cout<<*p;delete p;}

考题 下面程序的输出结果是 include includevoid main( ) { char p1[10] ,p2 下面程序的输出结果是#include<iostream.h>#include<string.h>void main( ){char p1[10] ,p2[10] ;strcpy(p1,"abc") ;strcpy(p2,"ABC") ;char str[50] ="xyz";strcpy(str+2,strcat(p1,p2) ) ;cout < < str;}A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC

考题 下面程序的输出结果是includeincludevoid main( ){char p1[10],p2[10]s 下面程序的输出结果是 #include<iostream.h> #include<string.h> void main( ) { char p1[10],p2[10] strcpy(p1,"abc"); strcpy(p2,"ABC"); char str[50]="xyz"; strcpy(str+2,strcat(p1,p2));A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC

考题 下面程序的输出结果是()。includeinclude"stdng.h"void main(){ char a[]="welcome 下面程序的输出结果是( )。 #include<iostream.h> #include"stdng.h" void main() { char a[]="welcome",b[]="well"; strcpy(a,b); cout<<a<<endl; }A.wellomeB.wellcomC.wellD.wellwe

考题 下面程序的输出结果是includeincludevoid main(){char p1[10],P2[10]; 下面程序的输出结果是 #include<iostream.h> #include<string.h> void main() { char p1[10],P2[10]; strcpy(p1,"abc"); strcpy(p2,"ABC"); char str[50]="xyz"; strcpy(str+2,strcat(P1,p2)); cout<<six; }A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC

考题 下面程序的输出结果是()。includeincludevoid main(){char p1[10],p2[10 下面程序的输出结果是( )。 #include<iostream.h> #include<string.h> void main() { char p1[10],p2[10]; strcpy(p1,”abc”); strcpy(p2,”ABC”); charsty[50]=“xyz”; strcpy(str+2,strcat(p1,p2)); cout<<str; }A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC

考题 下面程序的输出结果是()。includeincludeusing namespace std;void main(){c 下面程序的输出结果是( )。 #include<iostream> #include<string> using namespace std; void main(){ charp1[10],p2[10]; strcpy(p1,"abc"); strcpy(p2,"ABC"); charstr[50]="xyz"; strcpy(str+2,strcat(p1,p2)); cout<<str; }A.xyabcABCB.yzabcABCC.xyzabcABCD.zabcABC

考题 下面程序的输出结果是includeincludevoid main( ){char p1[10],p2[10]s 下面程序的输出结果是 #include<iostream.h> #include<string.h> void main( ) { char p1[10],p2[10] strcpy(p1,"abc"); strcpy(p2,"ABC"); char str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); cout<<str; }A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC