WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

Answers were Sorted based on User's Feedback



WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP..

Answer / vinodhini r

main()
{
int a,b;
scanf("%d %d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("%d %d",a,b);
}

Is This Answer Correct ?    26 Yes 2 No

WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP..

Answer / illa

sorry that is correct

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is difference between oop and pop?

0 Answers  


what is pointers

7 Answers   Exilant,


what is namespace? what are the uses of namespace?

1 Answers  


What is the important feature of inheritance?

0 Answers   BPL,


Can we have a private virtual method ?

8 Answers   Ness Technologies,


What is abstraction example?

0 Answers  


What is property in oops?

0 Answers  


write a c++ code of diagonal matrix.

2 Answers  


What is the full form of oops?

0 Answers  


Can static class have constructor?

0 Answers  


diff between Abstract class Interfaces?

4 Answers  


What is data binding?

4 Answers   Ittiam Systems,


Categories