wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

In C++, we can use the same function name to create functions that perform a variety of different tasks. This is known as -

A
Global function
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Function overloading
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Inheritance
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
All of the above
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Function overloading

In C++, we can use the same function name to create functions that perform a variety of different tasks. This is known as function overloading.

Function overloading is the ability to create multiple functions of the same name with different implementations. Calls to an overloaded function will run a specific implementation of that function appropriate to the context of the call, allowing one function call to perform different tasks depending on context.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction to Outsourcing
BUSINESS STUDIES
Watch in App
Join BYJU'S Learning Program
CrossIcon