How to add two numbers without using arithmetic operators?
Answer Posted / selloorhari
Hi Nitish,
If we will do the LOGICAL OR function then we will get
either 1 or 0.
If we will do the BITWISE OR then we will get the largest of
the two..
For
ex:
Let us take, First number as 2 and Second number as 3..
Then as per the first case we will get 1 as the output.
10(2) || 11(3) -> 1(1)
As per the second case the output will be 3..
10(2) | 11(3) -> 11(3).
Ok
| Is This Answer Correct ? | 14 Yes | 12 No |
Post New Answer View All Answers
How to throw some light on the b tree?
Explain Function Pointer?
What is malloc() function?
What is meant by realloc()?
Explain what are linked list?
Disadvantages of C language.
c program to compute AREA under integral
Is return a keyword in c?
What is the size of structure pointer in c?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
provide an example of the Group by clause, when would you use this clause
Explain what are its uses in c programming?
What is the usage of the pointer in c?
If I have a char * variable pointing to the name of a function ..
what is event driven software and what is procedural driven software?