How To Ideas | How To Articles | How To Tutorials


1

How To Swap Two Numbers In C


Swapping(Interchanging) two numbers in c is basic program to try. To swap two numbers you can use a third number. First of all store 1st number in 3rd,  then 2nd in 1st, now 3rd in 2nd and you will get swapped numbers in the 1st and 2nd variable.Follow these instructions

  1. 1st of all use #include<stdio.h> header file so that you can use instructions like printf, scanf, etc..
    #include<stdio.h>
  2. printf(“…..”) instructions is used to print text at output window
  3. scanf(“……”) instruction is used to get data from userswap two numbers in c

The output of this program will be as followswap two numbers in c

You can easily download c file from here. so take care and enjoy…….

Incoming search terms:

  • swap two number in c (1)
Filed in: C Tags: , , , , , , ,

One Response to "How To Swap Two Numbers In C"

  1. Vedashree says:

    this is really awesome.. the most easiest way to deal with ..
    thanks !

Leave a Reply

Submit Comment



© 7770 How To Ideas. All rights reserved.
Proudly designed by Theme Junkie.