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
What is getch?
What is meant by keywords in c?
write a program to create a sparse matrix using dynamic memory allocation.
What is meant by high-order and low-order bytes?
What is the difference between memcpy and memmove?
What are the complete rules for header file searching?
i want to know the procedure of qualcomm for getting a job through offcampus
Hi can anyone tell what is a start up code?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Explain what is the concatenation operator?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What are reserved words with a programming language?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What is the difference between near, far and huge pointers?
What is atoi and atof in c?