Difference between over loading and over ridding?
Answer Posted / manav sharma
Overloading: Same function or operator responds differently
on different types on inputs. This is done by defining a
function (including operator fn() definition) with the same
name but different argument list.
Overriding: Redefining any base class function in a
derieved class to work differently than what is defined in
the base class. So, now the same function called with same
argument list will behave differently when called on the
objects of base and derieved class.
Important: Which instance of function to bind with the
object depends on the type of object on which the function
is called and is decided on compile time. This is also
called early binding or compile time polymorphism.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
How Do you Code Composition and Aggregation in C++ ?
What is overloading and its types?
What are oops functions?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is pointer in oop?
Templates mean
Prepare me a program for the animation of train
What is encapsulation process?
What is encapsulation in oops?
What is difference between inheritance and polymorphism?
What is polymorphism explain its types?
What is use of overloading?
which feature are not hold visual basic of oop?
What is the highest level of cohesion?