C++

Write a Program to Implement Virtual Function.

#include <iostream>
#include <conio.h>
using namespace std;
class a
{
public:
virtual void show()
{
cout << “In class a”;
}
};
class b : public a
{
public:
void show()
{
cout << “\nIn class b”;
}
};
class c : public a
{
public:
void show()
{
cout << “\nIn class c”;
}
};

main()
{
a *p, obj_a;
b obj_b;
c obj_c;
p = &obj_a;
p -> show();
p = &obj_b;
p -> show();
p = &obj_c;
p -> show();
getch();
}



96 thoughts on “Write a Program to Implement Virtual Function.

  1. Aw, this was a really nice post. In idea I want to put in writing like this moreover ?taking time and precise effort to make an excellent article?however what can I say?I procrastinate alot and certainly not appear to get something done.

  2. Thank you so much for providing individuals with remarkably remarkable chance to read critical reviews from this website. It really is so pleasing plus stuffed with amusement for me personally and my office mates to visit your blog nearly three times per week to study the latest secrets you will have. And lastly, I’m just certainly happy with your sensational inspiring ideas served by you. Selected 1 ideas on this page are truly the finest we have ever had.

  3. Thanks a lot for giving everyone a very splendid opportunity to read articles and blog posts from this site. It really is very fantastic and also jam-packed with a good time for me personally and my office acquaintances to visit your blog no less than 3 times in one week to study the fresh guides you have got. And of course, I am also certainly satisfied considering the fabulous hints you give. Certain 2 areas on this page are clearly the most impressive we have all had.

  4. Can I just say what a relief to find someone who truly knows what theyre speaking about on the internet. You definitely know how one can deliver a problem to mild and make it important. Extra folks need to learn this and understand this facet of the story. I cant consider youre not more widespread since you definitely have the gift.

  5. I’m usually to running a blog and i really appreciate your content. The article has really peaks my interest. I am going to bookmark your site and keep checking for brand spanking new information.

  6. I just want to mention I am all new to weblog and honestly savored you’re web blog. Almost certainly I’m planning to bookmark your site . You surely come with excellent posts. Cheers for revealing your blog.

  7. I enjoy you because of your whole hard work on this web page. Betty enjoys conducting investigation and it’s obvious why. All of us learn all concerning the dynamic mode you offer great tips via the blog and therefore boost contribution from the others on the idea and our own daughter is now starting to learn a great deal. Take pleasure in the remaining portion of the year. You are conducting a remarkable job.

  8. Can I simply say what a reduction to seek out somebody who really knows what theyre talking about on the internet. You undoubtedly know learn how to convey an issue to light and make it important. Extra folks have to read this and perceive this facet of the story. I cant believe youre not more in style because you definitely have the gift.

  9. There are some fascinating closing dates on this article however I don抰 know if I see all of them middle to heart. There’s some validity but I’ll take hold opinion till I look into it further. Good article , thanks and we wish more! Added to FeedBurner as well

  10. An attention-grabbing dialogue is worth comment. I feel that you need to write more on this subject, it might not be a taboo subject but typically people are not enough to speak on such topics. To the next. Cheers

  11. I and my friends were actually going through the great items from your web page then suddenly got a terrible suspicion I had not thanked the web site owner for those tips. My women were definitely totally stimulated to read all of them and already have definitely been loving those things. I appreciate you for actually being considerably helpful as well as for picking out certain smart useful guides most people are really eager to discover. Our own sincere regret for not saying thanks to earlier.

  12. I found your blog site on google and test a few of your early posts. Continue to maintain up the superb operate. I simply further up your RSS feed to my MSN Information Reader. Looking for forward to reading extra from you later on!?

  13. I actually wanted to develop a note in order to express gratitude to you for some of the amazing tips and tricks you are sharing here. My extensive internet look up has at the end of the day been compensated with useful strategies to share with my best friends. I would point out that we site visitors are rather fortunate to exist in a remarkable place with many marvellous individuals with useful tips. I feel really lucky to have come across the site and look forward to tons of more amazing minutes reading here. Thanks a lot once more for all the details.

  14. After I originally commented I clicked the -Notify me when new feedback are added- checkbox and now every time a remark is added I get 4 emails with the identical comment. Is there any manner you may take away me from that service? Thanks!

  15. There are actually a whole lot of particulars like that to take into consideration. That may be a great level to deliver up. I supply the thoughts above as basic inspiration but clearly there are questions like the one you bring up where an important thing will be working in sincere good faith. I don?t know if greatest practices have emerged round things like that, but I am sure that your job is clearly recognized as a fair game. Each boys and girls feel the impact of only a moment抯 pleasure, for the rest of their lives.

  16. Thank you for any other great article. Where else may anyone get that type of information in such a perfect manner of writing? I have a presentation next week, and I’m at the look for such info.

  17. Hello there, I discovered your website by way of Google whilst searching for a related topic, your web site got here up, it looks good. I have bookmarked it in my google bookmarks.

  18. I will immediately clutch your rss feed as I can’t in finding your e-mail subscription link or newsletter service. Do you have any? Please let me know in order that I could subscribe. Thanks.

  19. I really enjoy looking through on this web site, it has wonderful content. “The living is a species of the dead and not a very attractive one.” by Friedrich Wilhelm Nietzsche.

  20. I just wanted to develop a brief note so as to appreciate you for the fantastic recommendations you are giving on this website. My incredibly long internet search has now been honored with reliable content to share with my friends and family. I would express that we site visitors are undoubtedly endowed to exist in a fabulous community with many special professionals with good principles. I feel rather grateful to have come across your website and look forward to some more amazing minutes reading here. Thank you again for a lot of things.

  21. I have been surfing online greater than three hours these days, but I by no means found any interesting article like yours. It is lovely price sufficient for me. In my view, if all website owners and bloggers made just right content as you probably did, the net might be a lot more helpful than ever before.

  22. I simply wanted to write a note to appreciate you for the magnificent facts you are sharing at this website. My time-consuming internet research has now been honored with professional facts to write about with my companions. I ‘d assume that we visitors are very much endowed to dwell in a useful site with so many brilliant individuals with very beneficial principles. I feel somewhat blessed to have come across your web site and look forward to some more excellent minutes reading here. Thank you again for a lot of things.

  23. I am not certain the place you’re getting your information, but good topic. I needs to spend a while studying much more or working out more. Thanks for great information I used to be searching for this information for my mission.

  24. Great beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept

  25. I really enjoy looking at on this site, it has got excellent content . “One doesn’t discover new lands without consenting to lose sight of the shore for a very long time.” by Andre Gide.

  26. whoah this weblog is magnificent i love studying your posts. Stay up the good work! You understand, a lot of persons are hunting round for this info, you can aid them greatly.

  27. Great paintings! That is the type of info that are supposed to be shared across the web. Shame on Google for now not positioning this put up higher! Come on over and visit my web site . Thanks =)

  28. I have been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.

  29. Hiya very nice website!! Guy .. Excellent .. Superb .. I’ll bookmark your site and take the feeds additionally…I am glad to seek out numerous helpful information right here within the submit, we need develop extra strategies on this regard, thanks for sharing.

  30. I want to show thanks to you just for bailing me out of this condition. Because of browsing throughout the internet and getting concepts which were not helpful, I thought my life was well over. Being alive devoid of the approaches to the difficulties you’ve resolved by way of your guide is a crucial case, as well as those that could have negatively damaged my career if I hadn’t noticed the website. Your personal natural talent and kindness in dealing with the whole lot was priceless. I’m not sure what I would’ve done if I had not discovered such a solution like this. I can also at this point look ahead to my future. Thanks so much for your reliable and effective help. I will not think twice to endorse your blog post to any individual who needs assistance about this subject.

  31. This is getting a bit more subjective, but I much prefer the Zune Marketplace. The interface is colorful, has more flair, and some cool features like ‘Mixview’ that let you quickly see related albums, songs, or other users related to what you’re listening to. Clicking on one of those will center on that item, and another set of “neighbors” will come into view, allowing you to navigate around exploring by similar artists, songs, or users. Speaking of users, the Zune “Social” is also great fun, letting you find others with shared tastes and becoming friends with them. You then can listen to a playlist created based on an amalgamation of what all your friends are listening to, which is also enjoyable. Those concerned with privacy will be relieved to know you can prevent the public from seeing your personal listening habits if you so choose.

  32. It truly is mostly not possible to find well-qualified parties on this matter, and yet you seem like you understand those things you’re preaching about! Appreciation

  33. I was pretty pleased to find this great site. I wanted to thank you for ones time due to this wonderful read!! I definitely enjoyed every part of it and I have you saved to fav to check out new stuff in your web site.

  34. I really wish to show you that I am new to putting up a blog and certainly liked your page. Most likely I am prone to remember your blog post . You undoubtedly have fabulous article content. Value it for discussing with us your main url page

  35. It is usually most suitable occasion to put together some options for the future. I’ve browsed this blog posting and if I can possibly, I desire to encourage you very few appealing instruction.

  36. What i do not realize is in truth how you’re no longer actually much more smartly-preferred than you might be right now. You’re very intelligent. You realize therefore considerably in the case of this subject, produced me in my opinion believe it from a lot of numerous angles. Its like women and men aren’t fascinated except it¡¦s one thing to do with Woman gaga! Your individual stuffs outstanding. Always maintain it up!

  37. I just desire to notify you that I am new to putting up a blog and extremely enjoyed your article. Most likely I am probably to save your blog post . You indeed have excellent article materials. Be Grateful For it for discussing with us your own url webpage

  38. hi!,I really like your writing so so much! proportion we keep in touch more about your article on AOL? I require an expert in this space to resolve my problem. Maybe that is you! Looking ahead to see you.

  39. Nice read, I just passed this onto a friend who was doing some research on that. And he actually bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch!

  40. magnificent issues altogether, you just received a emblem new reader. What would you recommend about your publish that you just made a few days in the past? Any certain?

  41. I intended to put you a very little note to help give many thanks the moment again just for the amazing views you have discussed on this page. It was remarkably generous with people like you to supply publicly precisely what a few individuals would have made available for an electronic book to help make some bucks for their own end, and in particular given that you could possibly have tried it in case you wanted. The tips also acted to be a fantastic way to be certain that other people have the identical passion just as my personal own to know the truth way more in regard to this issue. I think there are numerous more enjoyable situations up front for folks who see your site.

  42. I’m very pleased to discover this great site. I want to to thank you for ones time for this particularly wonderful read!! I definitely enjoyed every part of it and i also have you bookmarked to see new things on your site.

  43. obviously like your web site but you have to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I in finding it very troublesome to tell the reality nevertheless I¡¦ll surely come back again.

  44. Hello there, You’ve done a great job. I will certainly digg it and personally recommend to my friends. I am sure they will be benefited from this site.

  45. I’m still learning from you, but I’m trying to reach my goals. I absolutely liked reading everything that is written on your blog.Keep the aarticles coming. I loved it!

  46. Great ¡V I should certainly pronounce, impressed with your site. I had no trouble navigating through all the tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or something, web site theme . a tones way for your client to communicate. Nice task..

  47. It happens to be most suitable time to prepare some preparations for the long-run. I’ve scan this blog post and if I can possibly, I desire to propose you few appealing assistance.

  48. Greetings here, just became receptive to your website through Google, and discovered that it is quite entertaining. I will truly appreciate if you continue on such.

  49. I wanted to post you the little bit of remark to thank you once again for your amazing techniques you’ve contributed at this time. This has been extremely open-handed of you to convey publicly all that numerous people would’ve offered as an electronic book to generate some dough for themselves, primarily since you might well have done it in case you decided. These ideas also served as a fantastic way to be sure that other individuals have a similar desire just like mine to know more and more concerning this problem. Certainly there are millions of more pleasant instances in the future for individuals that see your blog.

  50. I was pretty pleased to uncover this website. I wanted to thank you for your time for this particularly wonderful read!! I definitely really liked every little bit of it and i also have you book marked to see new information in your website.

  51. We are a group of volunteers and starting a new scheme in our community. Your website provided us with valuable info to work on. You have done a formidable job and our whole community will be thankful to you.

  52. I have been exploring for a bit for any high-quality articles or blog posts on this sort of house . Exploring in Yahoo I eventually stumbled upon this website. Studying this information So i am glad to convey that I’ve a very good uncanny feeling I discovered just what I needed. I most certainly will make certain to don¡¦t disregard this site and give it a look on a continuing basis.

  53. I simply want to inform you you that I am new to writing a blog and pretty much cherished your report. Probably I am prone to bookmark your blog post . You simply have memorable article information. Be Grateful For it for giving out with us your current site information

  54. You actually make it appear really easy together with your presentation however I to find this matter to be really something which I think I might by no means understand. It kind of feels too complicated and extremely vast for me. I’m looking ahead on your next submit, I¡¦ll attempt to get the dangle of it!

  55. great post, very informative. I ponder why the opposite specialists of this sector don’t notice this. You must continue your writing. I’m sure, you’ve a great readers’ base already!

  56. I simply need to tell you that I am new to wordpress blogging and completely valued your review. Quite possibly I am prone to bookmark your blog post . You really have wonderful article materials. Like it for expressing with us your website page

  57. Jersey official website / Video
    The Jersey Battle of Flowers, The famous must-see annual event Jersey official website The Jersey Battle of Flowers The famous must-see annual event Welcome to the official Jersey Battle of Flowers website Thursday 8th August and Friday 9th August 2019 The Jersey Battle of Flowers Highlights from the 2018 Coming Soon The Jersey Battle of Flowers 2019 will take place on Thursday 8th August and Friday 9th August 2019. If you would like to benefit from sponsoring our event, click here. First staged in 1902 in celebration of a Royal Coronation, the Jersey Battle of Flowers has since grown over …
    The post Jersey official website / Video appeared first on Finance USA.

    [url=http://busines.remmont.com]San-diego Business[/url]

Leave a Reply

Your email address will not be published. Required fields are marked *