how to swap all the values without using temporary variable.
tha values r a = 20, x=60 and p=2.
Answers were Sorted based on User's Feedback
Answer / padmas
To swap the values without using temporary variable
for a,x and p,
Do a call to swap function for a and p and
another call to same swap function for x and p.
call1:swap(a,p);
call2:swap(x,p);
swap(variable1,variable2)
{no temporary variable}
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / padmas
If the values for a=20,x=60, and p=2 then
need another set of values for b=,y= and q= to do the swap
without using temporary variable.
Is This Answer Correct ? | 1 Yes | 2 No |
What are the Advantages of HashMap over Vector?
what is web configuration file
Difference between views and index in sas programming
What is std::auto_ptr?
What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe
Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,
0 Answers Indian Overseas Bank,
What is autocall macro and how to create autocall macro? what is the use of it?
What language / script is used to validate web page
how we can know the funcions available in a class recording java?
How to rename A1-A30 datasets into B1-B30 using macros?
how can i create report in abap to insert data in table pa0002 using insert command
preorder of A*(B+C)/D-G