Elance Exams Answers PDF file

-- PDF FILE --
Download PDF file of elance Zoho Creator Exam Answers
elance-zoho-creator-exam.pdf

Given the code below, which of the following is the output? #include <iostream> struct shape { virtual void move() { std::cout << "shape::move\n"; } }; struct circle : public shape { void move() { std::cout << "circle::move\n"; } }; struct rectangle : public shape { void move() { std::cout << "rectangle::move\n"; } }; int main() { shape *s; s = new shape(); s->move(); s = new circle(); s->move(); s = new rectangle(); s->move(); return 0; }

Compile error
Runtime error
rectangle::move circle::move shape::move
shape::move circle::move rectangle::move
shape::move shape::move shape::move
Top
  • Follows us our servcies
  • Facebook icon
  • Linkedin icon
  • twitter icon
  • rss icon
  • social icon