i^=j;
j^=i;
i^=j;
value of i,j



i^=j; j^=i; i^=j; value of i,j..

Answer / xyz

this code snippet will swap the value of i and j
This code works same as
i=i+j;
j=i-j;
i=i-j;

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More OOPS Interview Questions

What is difference between multiple inheritance and multilevel inheritance?

0 Answers  


Can we create object of abstract class?

0 Answers  


What is overriding in oops?

0 Answers  


Why is polymorphism important in oop?

0 Answers  


Differences between inline functions and non-inline functions?

4 Answers   Ness Technologies,






explain dynamic binding by drowing

2 Answers   Cognizant,


In c++ there is only virtual destructors, no constructors. Why?

4 Answers   IBM, Polaris,


what do you mean by static member variable?

2 Answers  


What is object in oop with example?

0 Answers  


#include <iostream> using namespace std; int main() { int a = 3; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][2]; }

1 Answers  


What is encapsulation in oops?

0 Answers  


can we make a class static without using static keyword?

5 Answers   Aspire,


Categories