Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
How could I, in C++ declare a class point. The class point has two private data members x and y of type float. The class point has a parameterized constructor to initialize both the data members i.e. x and y. The class point has a member function display() that display the value of x and y. Create two objects p1 and p2 with your desired data and display the values of x and y of p1 and p2. Now create a third object p3 by using the expression p3=p1+p2 and display the values of x and y of p3.
Related Answered Questions
Related Open Questions