Which is the correct syntax of declaring a virtual function?

a) virtual int func();
b) virtual int func(){};
c) inline virtual func();
d) inline virtual func(){};

1 thought on “ Which is the correct syntax of declaring a virtual function?”

  1. a
    Explanation: To make a function virtual function we just need to add virtual keyword at the starting of the function declaration.

Leave a Comment