What is function overloading in C++?

18 views
  • Creating multiple functions with the same name but different signatures. (Correct Answer)
  • Creating multiple functions with different names but the same signature.
  • Creating functions with the same name and signature.
  • Creating functions with different return types but the same name.

Explanation

Correct answer: a) Creating multiple functions with the same name but different signatures.

Explanation: Function overloading in C++ allows multiple functions to have the same name but different parameter lists (i.e., different signatures). This enables us to create functions that perform similar tasks but with different data types or numbers of arguments.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs