employer cover photo
employer logo
employer logo

Plintron Global Technology Solutions

Is this your company?

Plintron Global Technology Solutions interview question

The Only question ever asked in that interview is to write code to swap two variables without third variable

Interview Answers

Anonymous

22 Nov 2014

int main() { int x = 10, y = 5; // Code to swap 'x' and 'y' x = x + y; // x now becomes 15 y = x - y; // y becomes 10 x = x - y; // x becomes 5 printf("After Swapping: x = %d, y = %d", x, y); return 0; }

2

Anonymous

29 May 2013

well known question I think

1