How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / raghuram.a
int x,y;
x =x-y;
y =y+x;
x =y-x;
or
int x,y;
x=x^y;
y=x^y;
x=x^y;
| Is This Answer Correct ? | 11 Yes | 7 No |
Post New Answer View All Answers
Why is not a pointer null after calling free?
Is null valid for pointers to functions?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
in linking some of os executables are linking name some of them
Is a house a shell structure?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
Explain do array subscripts always start with zero?
Explain the properties of union. What is the size of a union variable
What is bin sh c?
What is nested structure with example?
Where can I get an ansi-compatible lint?
What does *p++ do?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
what is the different bitween abap and abap-hr?
I need previous papers of CSC.......plz help out by posting them.......