c Programming

Write a Program to Swap Values of Two Variables Without using 3rd Variable

By April 4, 2016 November 9th, 2016 97 Comments

/*Program to Swap Values of Two Variables Without using 3rd Variable*/
#include <stdio.h>
main()
{
int a, b, temp;
printf(“\nEnter any two numbers: “);
scanf(“%d %d”, &a, &b);
printf(“\n\nBefore Swapping:\n”);
printf(“\na = %d\n”, a);
printf(“\nb = %d\n”, b);
a = a + b;
b = a – b;
a = a – b;
printf(“\n\nAfter Swapping:\n”);
printf(“\na = %d\n”, a);
printf(“\nb = %d\n”, b);
getch();
}

97 Comments

  • I just want to tell you that I am newbie to blogs and definitely liked this blog. Probably I’m likely to bookmark your blog post . You actually come with amazing posts. Thank you for sharing with us your blog site.

  • I simply want to mention I am newbie to blogging and site-building and absolutely savored this web blog. More than likely I’m want to bookmark your website . You definitely have amazing stories. Thanks a lot for sharing with us your blog site.

  • it is wise to choice to select Light Emitting Diode christmas lights becaue they are not fire hazard’

  • Technology says:

    I have been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all web owners and bloggers made good content as you did, the web will be a lot more useful than ever before.

  • Business says:

    Great post. I was checking constantly this blog and I’m impressed! Extremely useful information specially the last part 🙂 I care for such information much. I was seeking this certain info for a long time. Thank you and good luck.

  • Game says:

    Thanks for your own labor on this site. Kate really loves working on internet research and it is obvious why. My spouse and i notice all regarding the compelling ways you deliver both interesting and useful items through this web blog and as well encourage response from the others on that subject and my child is now discovering a lot of things. Have fun with the remaining portion of the new year. You have been doing a powerful job.

  • Technology says:

    As I web-site possessor I believe the content matter here is rattling wonderful , appreciate it for your efforts. You should keep it up forever! Good Luck.

  • Legal says:

    Definitely, what a fantastic site and enlightening posts, I definitely will bookmark your site.All the Best!

  • Business says:

    This is really interesting, You are a very skilled blogger. I’ve joined your feed and look forward to seeking more of your magnificent post. Also, I’ve shared your site in my social networks!

  • Business says:

    Thank you a lot for providing individuals with an extremely breathtaking opportunity to read from this blog. It’s usually so superb and as well , jam-packed with a good time for me personally and my office acquaintances to search your website no less than thrice in 7 days to read through the fresh guidance you will have. And lastly, I’m also always pleased considering the mind-blowing ideas served by you. Some 3 points in this article are ultimately the best we’ve had.

  • Automotive says:

    I am not certain the place you’re getting your info, but great topic. I must spend some time finding out much more or understanding more. Thanks for wonderful information I was on the lookout for this information for my mission.

  • Automotive says:

    Whats Taking place i’m new to this, I stumbled upon this I’ve discovered It positively useful and it has helped me out loads. I’m hoping to contribute & assist other users like its aided me. Good job.

  • Business says:

    Hello. remarkable job. I did not imagine this. This is a impressive story. Thanks!

  • Automotive says:

    hi!,I love your writing very much! percentage we keep up a correspondence more about your post on AOL? I need an expert in this area to resolve my problem. Maybe that is you! Looking forward to see you.

  • Sports says:

    Good post and straight to the point. I am not sure if this is in fact the best place to ask but do you folks have any ideea where to employ some professional writers? Thanks in advance 🙂

  • Business says:

    It’s the best time to make some plans for the future and it’s time to be happy. I have read this post and if I could I want to suggest you some interesting things or advice. Maybe you can write next articles referring to this article. I wish to read even more things about it!

  • Technology says:

    Some really good information, Glad I found this. “Children require guidance and sympathy far more than instruction.” by Ambrose Gwinett Bierce.

  • hi!,I love your writing so a lot! proportion we keep in touch extra approximately your article on AOL? I need a specialist on this space to unravel my problem. May be that’s you! Looking ahead to look you.

  • Travel says:

    Absolutely composed content material, thank you for information. “You can do very little with faith, but you can do nothing without it.” by Samuel Butler.

  • Pets says:

    Attractive section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Anyway I’ll be subscribing to your augment and even I achievement you access consistently quickly.

  • Terrific work! That is the kind of info that should be shared around the web. Shame on the seek engines for no longer positioning this post upper! Come on over and seek advice from my site . Thank you =)

  • Whats Taking place i’m new to this, I stumbled upon this I have found It absolutely helpful and it has aided me out loads. I’m hoping to give a contribution & aid different users like its helped me. Good job.

  • Pets says:

    Great paintings! That is the kind of info that should be shared across the internet. Shame on the seek engines for now not positioning this submit upper! Come on over and talk over with my website . Thanks =)

  • magnificent put up, very informative. I wonder why the other specialists of this sector do not notice this. You should proceed your writing. I am sure, you have a great readers’ base already!

  • Heya i’m for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to give something back and aid others like you helped me.

  • I’m just commenting to let you know of the nice encounter my friend’s child gained reading through your site. She came to find too many pieces, which included what it’s like to possess an awesome teaching mood to make folks smoothly thoroughly grasp several impossible topics. You really exceeded our desires. Many thanks for distributing such useful, healthy, edifying not to mention unique thoughts on this topic to Lizeth.

  • Pets says:

    Well I sincerely enjoyed studying it. This tip provided by you is very useful for proper planning.

  • Pets says:

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how can we communicate?

  • Healthy Life says:

    Very interesting info!Perfect just what I was searching for!

  • Emeryeps says:

    Genuinely absorbing elements you’ll have stated, thanks for posting.

  • Business says:

    I like this post, enjoyed this one thanks for posting .

  • You have noted very interesting points! ps decent internet site.

  • Education says:

    Normally I do not learn post on blogs, however I would like to say that this write-up very forced me to check out and do it! Your writing style has been amazed me. Thanks, quite great post.

  • Merely a smiling visitor here to share the love (:, btw outstanding style. “The price one pays for pursuing a profession, or calling, is an intimate knowledge of its ugly side.” by James Arthur Baldwin.

  • Automotive says:

    Just wanna state that this is very beneficial , Thanks for taking your time to write this.

  • Law & Legal says:

    You made certain good points there. I did a search on the subject and found a good number of people will agree with your blog.

  • Science says:

    Very nice design and wonderful subject matter, absolutely nothing else we want : D.

  • Simply desire to say your article is as astounding. The clarity in your post is just excellent and i could assume you’re an expert on this subject. Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please continue the enjoyable work.

  • divorce mind says:

    Divorcemind.com is a online divorce resource for divorce attorney, attornies and lawyers. You will find the best divorce information online. Divorce Mind will make your divorce or separation a quick, convenient and private.

  • Family says:

    of course like your web-site however you have to check the spelling on several of your posts. Many of them are rife with spelling problems and I to find it very bothersome to inform the reality however I’ll surely come again again.

  • Woman says:

    I have read some good stuff here. Definitely worth bookmarking for revisiting. I surprise how a lot effort you place to make this kind of great informative site.

  • Gardenings says:

    I really appreciate this post. I have been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thanks again!

  • Automotive says:

    Very interesting details you have remarked, regards for putting up. “The judge is condemned when the criminal is absolved.” by Publilius Syrus.

  • Donate Car says:

    You have noted very interesting points ! ps nice internet site . “‘Tis a sharp medicine, but it will cure all that ails you. — last words before his beheadding” by Sir Walter Raleigh.

  • Woman says:

    Some truly good articles on this web site, regards for contribution. “A religious awakening which does not awaken the sleeper to love has roused him in vain.” by Jessamyn West.

  • I’ll gear this review to 2 types of people: current Zune owners who are considering an upgrade, and people trying to decide between a Zune and an iPod. (There are other players worth considering out there, like the Sony Walkman X, but I hope this gives you enough info to make an informed decision of the Zune vs players other than the iPod line as well.)

  • Going Here says:

    I’m more than happy to find this site. I want to to thank you for ones time for this particularly fantastic read!! I definitely enjoyed every little bit of it and I have you book-marked to look at new information on your site.

  • I merely intend to show you that I am new to writing a blog and utterly admired your webpage. Very possible I am inclined to save your blog post . You certainly have excellent article blog posts. Delight In it for share-out with us your own blog report

  • Any others says:

    Quite helpful suggestions you have remarked, thank you for publishing.

  • Hello there, just became aware of your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I will be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!

  • What i don’t understood is in reality how you’re now not actually much more smartly-preferred than you may be right now. You’re so intelligent. You recognize thus considerably on the subject of this subject, made me personally imagine it from numerous varied angles. Its like men and women don’t seem to be involved unless it¡¦s one thing to do with Woman gaga! Your individual stuffs outstanding. At all times deal with it up!

  • site says:

    It can be practically not possible to come across well-aware americans on this theme, still you look like you know which you’re revealing! Bless You

  • you’re actually a good webmaster. The website loading pace is amazing. It kind of feels that you are doing any unique trick. Furthermore, The contents are masterpiece. you’ve done a wonderful activity in this topic!

  • over here says:

    It happens to be perfect time to put together some schedules for the possible future. I’ve study this piece of writing and if I may just, I wish to recommend you handful of enlightening tips and advice.

  • see it here says:

    It happens to be ideal occasion to generate some schemes for the foreseeable future. I have digested this blog posting and if I could, I desire to suggest you a few insightful instruction.

  • Heya here, just got conscious of your weblog through Search engine, and have found that it is very helpful. I’ll appreciate in the event you persist this approach.

  • I just hope to notify you that I am new to blog posting and pretty much adored your report. Quite possibly I am going to save your blog post . You literally have great article materials. Be Thankful For it for giving out with us your own domain write-up

  • Really absorbing data that you have remarked, thanks a lot for setting up.

  • I am not certain the place you are getting your information, however great topic. I needs to spend a while studying more or understanding more. Thank you for magnificent information I was on the lookout for this information for my mission.

  • situs toto says:

    Hands down, Apple’s app store wins by a mile. It’s a huge selection of all sorts of apps vs a rather sad selection of a handful for Zune. Microsoft has plans, especially in the realm of games, but I’m not sure I’d want to bet on the future if this aspect is important to you. The iPod is a much better choice in that case.

  • I’ve been absent for some time, but now I remember why I used to love this blog. Thanks , I¡¦ll try and check back more often. How frequently you update your website?

  • Going Here says:

    I’m excited to uncover this website. I wanted to thank you for your time just for this wonderful read!! I definitely liked every bit of it and I have you book marked to see new information on your web site.

  • site here says:

    I just wish to inform you that I am new to writing and utterly admired your page. Quite possibly I am likely to remember your blog post . You certainly have outstanding article content. Admire it for share-out with us your favorite site document

  • Unbelievably enjoyable resources you have mentioned, thanks so much for writing.

  • Exceedingly informative details you have remarked, thank you for adding.

  • web says:

    It can be mostly not possible to find well-informed readers on this content, nevertheless you seem like you comprehend which you’re writing about! Regards

  • I was extremely pleased to discover this web site. I wanted to thank you for ones time for this particularly wonderful read!! I definitely enjoyed every part of it and I have you book-marked to look at new stuff in your web site.

  • Hello here, just turned out to be alert to your blog page through Google, and realized that it’s pretty informative. I will value should you decide maintain this idea.

  • Absolutely stimulating elements that you have stated, thanks so much for submitting.

  • It is most suitable occasion to produce some schemes for the possible future. I’ve read through this piece of writing and if I can, I want to encourage you a few insightful tips and advice.

  • Nice read, I just passed this onto a colleague who was doing a little research on that. And he just bought me lunch because I found it for him smile Therefore let me rephrase that: Thank you for lunch!

  • Dentist says:

    Good write-up, I¡¦m normal visitor of one¡¦s web site, maintain up the nice operate, and It’s going to be a regular visitor for a lengthy time.

  • Automotive says:

    I am really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the nice quality writing, it’s rare to see a great blog like this one nowadays..

  • Business says:

    Thanks a lot for sharing this with all folks you actually realize what you’re speaking approximately! Bookmarked. Please additionally discuss with my site =). We will have a link change contract among us!

  • you are in point of fact a good webmaster. The site loading velocity is incredible. It kind of feels that you’re doing any distinctive trick. Moreover, The contents are masterpiece. you’ve performed a wonderful task on this subject!

  • I really appreciate this post. I¡¦ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thank you again

  • check says:

    Fairly stimulating elements you’ll have mentioned, thank you for adding.

  • here says:

    It really is practically extremely difficult to see well-aware viewers on this subject, still you look like you fully understand what you’re raving about! Appreciate It

  • I simply intend to share it with you that I am new to online blogging and undeniably admired your webpage. Likely I am likely to remember your blog post . You undoubtedly have excellent article material. Be Thankful For it for discussing with us your domain page

  • my link says:

    Pretty helpful data you’ll have stated, thank you for writing.

  • I’m extremely pleased to uncover this site. I need to to thank you for your time for this wonderful read!! I definitely liked every bit of it and i also have you book marked to see new things in your site.

  • find this says:

    Truly engaging resources you have stated, say thanks a lot for writing.

  • Business says:

    Whats Taking place i am new to this, I stumbled upon this I’ve discovered It absolutely helpful and it has aided me out loads. I hope to give a contribution & aid other users like its aided me. Good job.

  • Automotive says:

    I have been absent for a while, but now I remember why I used to love this website. Thanks , I¡¦ll try and check back more frequently. How frequently you update your website?

  • Good day there, just got alert to your web page through Bing and yahoo, and discovered that it’s quite interesting. I’ll truly appreciate should you decide persist this approach.

  • Finance says:

    I savor, lead to I found exactly what I used to be having a look for. You have ended my four day long hunt! God Bless you man. Have a great day. Bye

  • Real Estate says:

    I wanted to send you the little bit of remark to help thank you very much as before for your beautiful concepts you have shown on this website. It was so open-handed with you to convey publicly exactly what numerous people might have marketed for an e-book to get some money on their own, principally now that you might have done it in the event you decided. Those thoughts also acted as the great way to realize that many people have a similar zeal really like my personal own to learn more and more in respect of this condition. I believe there are numerous more pleasurable sessions in the future for people who start reading your blog post.

  • Education says:

    Good article and right to the point. I am not sure if this is truly the best place to ask but do you guys have any thoughts on where to employ some professional writers? Thanks 🙂

  • Generally I don’t read post on blogs, but I would like to say that this write-up very pressured me to try and do so! Your writing style has been amazed me. Thank you, very great article.

  • our website says:

    It is usually right occasion to produce some goals for the possible future. I have read through this blog and if I can possibly, I wish to recommend you number of great advice.

  • Technology says:

    Wow, awesome blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your site is magnificent, let alone the content!

  • Finance says:

    You made some good points there. I did a search on the issue and found most persons will agree with your website.

  • Business says:

    Thanks so much for providing individuals with such a memorable chance to read critical reviews from this blog. It’s usually so beneficial and jam-packed with a good time for me personally and my office peers to search your website nearly 3 times in one week to see the new stuff you have. And of course, I’m just usually happy concerning the breathtaking secrets served by you. Some 4 ideas in this posting are ultimately the most suitable we’ve had.

  • Noticeably motivating suggestions you’ll have remarked, a big heads up for submitting.

  • Greetings here, just started to be receptive to your blog site through Google, and found that it is pretty helpful. I’ll be grateful for if you persist this.

  • I really desire to advise you that I am new to writing a blog and pretty much enjoyed your site. Very possible I am probably to save your blog post . You undoubtedly have outstanding article content. Get Pleasure From it for discussing with us your own internet site report

Leave a Reply