asked 37.0k views
2 votes
What does "overloaded" mean in programming, and list some overloaded operators?

a) Having multiple functions with the same name, performing different tasks
b) Assigning multiple values to a single variable
c) Extending the capacity of a data type
d) None of the above

1 Answer

3 votes

Final answer:

In programming, "overloaded" means having multiple functions with the same name but performing different tasks. Examples of overloaded operators include '+', '<<', and '++'.

Step-by-step explanation:

In programming, "overloaded" refers to having multiple functions with the same name but performing different tasks. This concept is known as function overloading. It allows programmers to define multiple functions with the same name but different parameters or argument types. This helps improve code readability and makes the code more expressive.

Some examples of overloaded operators in programming include:

  • Operator '+': It can be used to add numbers or concatenate strings.
  • Operator '<<': It can be used to insert values into a stream or output data to the console.
  • Operator '++': It can be used to increment a variable or define a custom increment operation.

answered
User Seetha
by
8.3k points