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 |
What is hashing in c language?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
compute the nth mumber in the fibonacci sequence?
10 Answers Canon, HPL, Satyam, TCS,
Binary tree traversing
Explain zero based addressing.
What is the translation phases used in c language?
WAP to convert text into its ASCII Code and also write a function to decode the text given?
Write program to remove duplicate in an array?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL
4.A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above
how to generate the length of a string without using len funtion?