How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / emperor of america
using bitwise operator works 100%:
x^=y;
y^=x;
x^=y;
using +/- works sometime, need to consider overflow.
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Which of these functions is safer to use : fgets(), gets()? Why?
What is difference between class and structure?
How main function is called in c?
What is the method to save data in stack data structure type?
What are structural members?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What is local and global variable in c?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Why is it usually a bad idea to use gets()? Suggest a workaround.
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
What is d scanf?
Tell me when would you use a pointer to a function?
what type of questions arrive in interview over c programming?
How can type-insensitive macros be created?
What is the significance of an algorithm to C programming?