how to swap two numbers with out using temp variable

Answer Posted / sachin patil

a = 5;
b = 10;
a = a+b;
b = a-b;
a = a-b;

Is This Answer Correct ?    55 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain class invariant.

650


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

781


Can a Structure contain a Pointer to itself?

672


What are stacks?

680


What is main function in c++ with example?

625






Define a nested class.

674


What is the use of bit fields in structure declaration?

598


Why c++ is created?

634


What is else syntax in c++?

711


What are static type checking?

692


What are vectors used for in c++?

680


What is std namespace in c++?

783


What are static variables?

670


Which is not a valid keyword a) public b) protected c) guarded

824


What is a local reference?

752