how to swap all the values without using temporary variable.
tha values r a = 20, x=60 and p=2.
Answer Posted / gurusaran
x=x*a; (x=1200)
a=x/a; (a=60)
x=x/a; (x=20)
p=p*x; (p=40)
x=p/x; (x=2)
p=p/x; (p=20)
Hence final values are a=60,x=2,p=20
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Difference between HTML and DHTML?
If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this
In OB52 , How to define two open posting period, Like only 5 and 8 posting should be open.. should not open 6 and 7..period..
Find out the list of roles which gives access to GUI activities? thanks in advance
Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
what is difference between kpo and it industry? that is in terms of work, package etc
HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??
What is the difference between WebIntelligence and Designer in creating universes?
Given a set. Write the pseudo code to get all the subsets for the given set. Eg. Input : {1,2} Output : (),(1),(2),(1,2)
What are the tasks performed by a Team Lead
5.Call by value and Call by reference with program?
how to display xisheet in list box in c# .net
a characteristic of a multiprogramming is? a.simultaneous exe of pgm instr 4m 2 appli b.concurrent processing of 2 r more prgms c.multiple cpu s d.all the abov
in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?
Write a program to swap the content of two variables without using a third variable.