How many ways are there to swap two numbers without using
temporary variable? Give the each logic.
Answer Posted / kishan gowda
One more method its bit complicated from the people from
the non electronics background......
void main()
{
pf(" a and b ");
sf("%d %d", &a, &b);
a= a^b;
b= b^a;
a= a^b;
pf("Swapped no's are a=%d and b=%d" ,a ,b);
}
| Is This Answer Correct ? | 24 Yes | 4 No |
Post New Answer View All Answers
int far *near * p; means
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
How many types of arrays are there in c?
What does the function toupper() do?
What are pointers? What are stacks and queues?
Explain what are compound statements?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
How do you construct an increment statement or decrement statement in C?
What is character set?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
Can main () be called recursively?
What is the difference between text and binary modes?
How many loops are there in c?
Where is c used?
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?