Which type of polymorphism is achieved through function overloading in C++?

Options

  • A. Runtime Polymorphism
  • B. Compile-time Polymorphism
  • C. Dynamic Binding
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Compile-time Polymorphism

Detailed Explanation

Explanation: Function overloading is an example of compile-time (static) polymorphism. The compiler determines which overloaded function to call based on the number and types of arguments.