n1 ed out of question #include using namespace std; class vec { int x, y; public: vec() { x = 2; y = 2; } voi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

n1 ed out of question #include using namespace std; class vec { int x, y; public: vec() { x = 2; y = 2; } voi

Post by answerhappygod »

N1 Ed Out Of Question Include Iostream Using Namespace Std Class Vec Int X Y Public Vec X 2 Y 2 Voi 1
N1 Ed Out Of Question Include Iostream Using Namespace Std Class Vec Int X Y Public Vec X 2 Y 2 Voi 1 (277.35 KiB) Viewed 42 times
N1 Ed Out Of Question Include Iostream Using Namespace Std Class Vec Int X Y Public Vec X 2 Y 2 Voi 2
N1 Ed Out Of Question Include Iostream Using Namespace Std Class Vec Int X Y Public Vec X 2 Y 2 Voi 2 (218.42 KiB) Viewed 42 times
n1 ed out of question #include <iostream> using namespace std; class vec { int x, y; public: vec() { x = 2; y = 2; } void setxY(int a, int b) { x = a; y = b; } void disp() { cout<< x << ',' << y <<endl; } }; E int main() { vec v1; v1.disp(); vec V2 v1; v1.setXY(2, 2); V2.disp(); 0 à 11 1,1 ob. 0 0 2,2 O c. 0,0 0.0 d. 1 1 22 o e. 2,2 2 2

2 ad out of question #include <iostream> using namespace std; class vec { int **, *y; public: vec() { x = new int; y = new int; *x = 5; *y = 5); } void setxY(int a, int b) { *x = a; *y = b; } void disp() { cout<< *x << ',' « *y <<endl; } }; int main() { Vec v1; v1.disp(); vec V2 = V1; v1.setXY(2, 2); v2.disp(); } O a 2.2 2,2 O b. 5. 5 2,2 O c.5.5 5,5 d. 2.2. 5.5
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply