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 can I invoke another program or command and trap its output?
Explain that why C is procedural?
Explain how can I write functions that take a variable number of arguments?
State the difference between x3 and x[3].
Give basis knowledge of web designing ...
Do you know the use of 'auto' keyword?
List out few of the applications that make use of Multilinked Structures?
What is the difference between text and binary i/o?
What is the use of in c?
Explain the use of function toupper() with and example code?
What is the importance of c in your views?
Can you return null in c?
What is the use of void pointer and null pointer in c language?
Explain how can you restore a redirected standard stream?
Where is c used?