Which choice is the correct declaration for the class named Dog, derived from the Animal class?

Advertisement

class Animal{
//….
}

  • A
    class Dog :: public Animal {
    //….
    };
  • B
    class Dog : public Animal {
    //….
    };
  • C
    public class Animal :: Dog {
    //….
    };
  • D
    public class Dog extends Animal {
    //….
    };
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend