Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is getch?

1117


What is meant by keywords in c?

1044


write a program to create a sparse matrix using dynamic memory allocation.

4857


What is meant by high-order and low-order bytes?

1009


What is the difference between memcpy and memmove?

985


What are the complete rules for header file searching?

1048


i want to know the procedure of qualcomm for getting a job through offcampus

2425


Hi can anyone tell what is a start up code?

2028


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1076


Explain what is the concatenation operator?

1122


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1028


What are reserved words with a programming language?

1083


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3273


What is the difference between near, far and huge pointers?

1045


What is atoi and atof in c?

1046