CS Electrical And Electronics
@cselectricalandelectronics

Identify the correct syntax of const member function inside the following class?

All QuestionsCategory: Cpp LanguageIdentify the correct syntax of const member function inside the following class?
Anonymous asked 3 years ago

class Point {
     int x;
     int y;
     public:
     //TODO : printxy function
};
 
Options:

  1. const void printxy();
  2. void const printxy();
  3. void printxy() const;
  4. None of the above