How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / divya
#include<stdio.h>
main()
(
clrscr();
int a,b;
printf("enter a and b values");
scanf("%d \n %d",&a,&b);
printf("before swaping a value is:%d",a);
printf("before swaping b value is:%d",b);
a=a+b;
b=a-b;
a=a-b;
printf("after swaping a value is:%d",a);
printf("after swaping b value is:%d",b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a const pointer?
How to write a multi-statement macro?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
FILE PROGRAMMING
What is the difference between typedef and #define?
Why is C language being considered a middle level language?
What is abstract data structure in c?
What are two dimensional arrays alternatively called as?
what will be the output for the following main() { printf("hi" "hello"); }
In a byte, what is the maximum decimal number that you can accommodate?
What is I ++ in c programming?
What are pointers?
What is the difference between far and near in c?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm