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 |
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
Define VARIABLE?
What is the scope of static variable in c?
what is constant pointer?
How many types of functions are there in c?
20. main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); } Answer:??????
What does & mean in scanf?
Explain what does the format %10.2 mean when included in a printf statement?
How to convert a binary number to Hexa decimal number?? (Note:Do not convert it into binary and to Hexadecimal)
What is the return type of sizeof?
Why can arithmetic operations not be performed on void pointers?