Function Overloading And Overriding in C++
Vložit
- čas přidán 7. 01. 2018
- JOIN ME:
CZcams 🎬 / @cppnuts
Patreon 🚀 / cppnuts
In this video we will see the difference between function overloading and function overriding in c++. So many people get confuse about this point, so let me know if you have any doubt in the comment section.
#cpp #programming #tutorial #interviewquestions #computerscience #softwareengineering
Hello sir, I am actually having my semester exams next week and I am really glad that I found your channel just at the right time, I have learned and improved on so many concepts and now I am pretty confident in myself, Thank you sir
Excellent explanation, very clear example, and covered even more details such as binding, inheritance, and polymorphism. Thank you for this 👍
I'm learning a lot with this channel, I'm not profesional programmer, but I read a lot about C++, but you are clarifing me a lot of concepts I read... Thanks a lot...
You are welcome!!
Hello Sir, Your teaching skill is too good, you touched all the point. Thank you so much.
+Tyson, Thank you so much for such a nice comment.. :D
thanks for this video....That's a great explanation........
+Srinivas KL you are welcome dude.
Appreciate your efforts
+Dhawal Arora thanks man.. :)
Hi Sir, What is the reason why function overloading is not possible with return type?
can you make a video how runtime ploymorphism works
Sure man i was also planning for this video.
Well, at least you made it one video where I could understand what you were saying in the first 5-10 seconds of your video...
+Tom B that's because you complained about it last time :)
I will say one thing though--your videos make me want to go try the Sublime editor. It looks pretty cool!
+Tom B yes it is.
Linkedin Question:
Consider this function declaration of is_even, which takes in an integer and returns true if the argument is an even number and false otherwise. Which declarations are correct for overloaded versions of that function to support floating point numbers and string representations of numbers?
A
bool is_even(float f);
bool is_even(char *str);
B
bool is_even(float f);
bool is_even(char str);
C
bool is_even_float(float f);
bool is_even_str(char *str);
D
float is_even(float f);
char *is_even(char *str);
There is no even odd for floating numbers, may be he was looking for that answer.
And if he was serious about this question then there is an ambitious call when you have any float version what is mentioned in the question, but if you are ready to typecast number before calling float overload then it will work. And answer A is correct then.
But as i mentioned there are so many questions to ask to interviewer to reach to this conclusion.
Which ide are you using?
sublime OR vscode
@@CppNuts thanks for your response... Are you teaching online c++ courses?
No, just upload videos.