write a program to swap Two numbers without using temp variable.
Answer Posted / ankit
a=a+b;
b=a-b;
a=a-b;
example int a=2;int b=3
put a=2 & b=3
a=2+3;
b=5-3;
a=5-2;
a=3;
b=2;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
Disadvantages of C language.
In a byte, what is the maximum decimal number that you can accommodate?
What is a null pointer in c?
Why is a semicolon (;) put at the end of every program statement?
Explain a pre-processor and its advantages.
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
Write a program to know whether the input number is an armstrong number.
How to delete a node from linked list w/o using collectons?
What is #define used for in c?
Is it acceptable to declare/define a variable in a c header?
Why is it important to memset a variable, immediately after allocating memory to it ?
What is a wrapper function in c?
How do I send escape sequences to control a terminal or other device?
What does node * mean?