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

tell about copy constructor

3 Answers   Siemens,


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

0 Answers  


#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

0 Answers  


Is oop better than procedural?

0 Answers  


what is an instance of a class

5 Answers  






what is object oriented programming and procedure oriented programming?

3 Answers  


write a program to find 2 power of a 5digit number with out using big int and exponent ?

0 Answers  


how much classes are used in c++

5 Answers  


What are the valid types of data that the main () can return in C/C++ language

3 Answers  


Explain virtual inheritance?

0 Answers  


What are functions in oop?

0 Answers  


officer say me - i am offered to a smoking , then what can you say

0 Answers  


Categories