swapping of two numbers without using third variable using
AND and OR operators
Answers were Sorted based on User's Feedback
Answer / ramesh reddy
a = a^b; b =a^b; a =a^b;
or
a=a+b; b=a-b; a=a-b;
| Is This Answer Correct ? | 43 Yes | 2 No |
however we can implement using EXoR , where it is made of
AND and OR gate too....
x=90;
y=51;
x^=y^=x;
the value of x & y will be swapped.
| Is This Answer Correct ? | 8 Yes | 8 No |
int i=10; printf("%d %d %d", i, i=20, i);
i want to make a program in which we use input having four digits(4321) and get output its reciprocal(1234).
What is auto keyword in c?
hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????
why programming language C is still used in operating system's kernel??
What are local static variables?
Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.
Subtract Two Number Without Using Subtraction Operator
write a program to find a given no. is divisible by 3 or not without using any arthimetic operators?
Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********
What is maximum size of array in c?
Why is main function so important?