write a program to swap Two numbers without using temp variable.
Answer Posted / swechha
a=a-b
b=a+b
a=b-a
if a=5 and b=10 then
a=5-10=(-5)
b=(-5)+10=5
a=5-(-5)=5+5=10
now a=10 & b=5
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
Can you add pointers together? Why would you?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
What is a stream water?
What is static volatile in c?
What is the difference between typedef and #define?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
How can I manipulate individual bits?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is an lvalue?
What does the error message "DGROUP exceeds 64K" mean?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Who is the founder of c language?
What is a const pointer?
How do you define a string?