Switch to full style
For C/C++ coders discussions and solutions
Post a reply

swap two numbers c++ program

Tue Aug 23, 2011 11:01 am

write a program using function to swap the two numbers Programmer:  



Re: c++ program

Tue Aug 23, 2011 10:12 pm

dear , we don;t solve full assignments here , you have to give it a try ( best effort) anyway , this is one is simple

Code:
  int num1=34;
  int num2=35;
  int temp=0;

   temp=num1;
   num1=num2;
   num2=temp;


Re: c++ program

Fri Sep 02, 2011 8:17 pm

Hi bro..can we swap two variables without operators? if yes how?

Re: c++ program

Sun Sep 04, 2011 1:32 am

without equal operator ?

Re: c++ program

Sun Sep 04, 2011 9:45 am

without arithmatic oprators..
But bro is it possible to swap without equal operator?

Re: c++ program

Thu Sep 08, 2011 10:27 pm

how !!! i think it is impossible ? :)

Post a reply
  Related Posts  to : swap two numbers c++ program
 Swap Using Pointers     -  
 list swap in C++     -  
 SWAP images using JQuery just by using the src attribute img     -  
 add two 24-bit numbers (sum two numbers)     -  
 JProgressbar Sum of 'n' Numbers     -  
 Complex Numbers     -  
 The harmonic mean of two numbers is given by:     -  
 The harmonic mean of two numbers is given by     -  
 add sequence of decimal numbers     -  
 add underscore between the digits numbers     -