write a program to swap two numbers without using temporary
variable?
Answer Posted / it diploma student
let a and b be the variables
a=a+b
b=a-b
a=a-b
if we take a=5 and b = 7 then
a = 5+7 = 12
b = 12-7 = 5
a = 12-5 = 7
hence swaped...
| Is This Answer Correct ? | 26 Yes | 3 No |
Post New Answer View All Answers
How we can insert comments in a c program?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
What is union and structure in c?
What is void c?
What are the parts of c program?
Why we use int main and void main?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
How can you pass an array to a function by value?
What is the difference between malloc() and calloc() function in c language?
Are negative numbers true in c?
How can you convert integers to binary or hexadecimal?
What is c definition?
Why is c not oop?
What is new line escape sequence?
What are 3 types of structures?