arrow
arrow
arrow
Which of the following can be overloaded?
Question



Which of the following can be overloaded?

A.

Variable

B.

Objects

C.

Class

D.

Function

Correct option is D

Function overloading is a feature in programming languages like C++ that allows multiple functions to have the same name but differ in their parameter types, numbers, or both. This enables the same function name to perform different tasks based on the context.
Important Key Points:
1. Overloading increases code readability and reusability by using the same function name for different purposes.
2. The compiler differentiates overloaded functions by their signatures (number and types of parameters).
3. Overloading is specific to functions and operators, not variables or classes.
Knowledge Booster:
1. Variable: Cannot be overloaded because variables must have unique identifiers in the same scope.
2. Objects: Are instances of classes and do not support overloading.
3. Class: Does not support overloading directly, though methods within a class can be overloaded.
4. Function overloading is different from function overriding, which occurs in inheritance when a derived class redefines a base class function.

Free Tests

Free
Must Attempt

UP SI 2025 Full Mock Test : 01

languageIcon English
  • pdpQsnIcon160 Questions
  • pdpsheetsIcon400 Marks
  • timerIcon120 Mins
languageIcon English
Free
Must Attempt

UP Police Constable Full Mock Test 01

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon300 Marks
  • timerIcon120 Mins
languageIcon English
Free
Must Attempt

Government Policies and Scheme

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon5 Mins
languageIcon English
test-prime-package

Access ‘UPSSSC JE’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow