已收录475621道考试试题

最后更新:2026-01-23

”“ 搜索结果

为您找到相关结果约475621

下列程序的运行结果是( ) #include #include using namespace std; class Point {public: Point(int X=0, int Y=0); Point(Point &p); int GetX() {return X;} int GetY() {return Y;} static int countP; static void GetC(Point A,Point B) {int z; z=sqrt((B.X-A.X)*(B.X-A.X)+(B.Y-A.Y)*(B.Y-A.Y)); cout<X=X;this->Y=Y; countP++;} Point::Point(Point &p) { X=p.X; Y=p.Y; countP++;} int Point::countP=0; int main() { Point D(3,4),*p; Point E(D); p=&E; void (*q)(Point,Point)=Point::GetC; (*q)(D,E); return 0; }
查看更多
有以下程序段 char a = {{'a','b'},{'c','d'}}; char (*p) = a; cout<<*(*(p+1)); p++; cout<<*(*p+1)<
查看更多
有下列程序 using namespace std; class SC {public: SC(int r){R =_____________;} int Get(){return *R;}; private: int *R; }; int main() { SC C(10); cout <
查看更多
有以下类定义 using namespace std; class B1{ int b1; public: B1(int i){b1=i; cout<
查看更多
有以下程序 #include using namespace std; class Point {public: Point(float xx=0, float yy=0) {X=xx;Y=yy;} float GetX() {return X;} private: float X,Y;}; class Rectangle: private Point {public: Rectangle(float x, float y, float w, float h):Point(x,y) {W=w;H=h;} float GetX() {return ___________;} float GetH() {return H;} float GetW() {return W;} private: float W,H;}; int main() { Rectangle r(1,2,3,4); cout<
查看更多