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

What are the features of c language?

0 Answers  


what is dangling pointer?

1 Answers   LG Soft,


What's the difference between a linked list and an array?

14 Answers  


What are data types in c language?

0 Answers  


What are the 4 types of programming language?

0 Answers  






What is equivalent to ++i+++j?

0 Answers  


What is a protocol in c?

0 Answers  


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

0 Answers  


what is a NULL pointer?

2 Answers  


Who is the main contributor in designing the c language after dennis ritchie?

0 Answers  


print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5

7 Answers   IBM,


What's wrong with "char *p; *p = malloc(10);"?

5 Answers  


Categories