how to swap 4 number without using temporary number?

Answers were Sorted based on User's Feedback



how to swap 4 number without using temporary number?..

Answer / brinda balakrishnan

a=a+b+c+d;
b=a-(b+c+d);
c=a-(b+c+d);
d=a-(b+c+d);
a=a-(b+c+d);

Is This Answer Correct ?    25 Yes 0 No

how to swap 4 number without using temporary number?..

Answer / sandeep

a=a^b;
b=a^b;
a=a^b;

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

program to convert a integer to string in c language'

0 Answers  


write an algorithm to display a square matrix.

0 Answers  


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

0 Answers  


What do you mean by recursion in c?

0 Answers  


Why should I use standard library functions instead of writing my own?

0 Answers  






Define macros.

0 Answers   Tech Mahindra,


What are the functions to open and close file in c language?

0 Answers  


What does dm mean sexually?

0 Answers  


Add Two Numbers Without Using the Addition Operator

0 Answers  


What compilation do?

7 Answers   Geometric Software, Infosys,


what is the hardware model of CFG( context free grammar)

0 Answers   Microsoft,


What is the difference between int main and void main in c?

0 Answers  


Categories