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

How to throw some light on the b tree?

1079


Explain Function Pointer?

1158


What is malloc() function?

1153


What is meant by realloc()?

1134


Explain what are linked list?

1041


Disadvantages of C language.

1095


c program to compute AREA under integral

2392


Is return a keyword in c?

1073


What is the size of structure pointer in c?

1060


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

1083


provide an example of the Group by clause, when would you use this clause

2186


Explain what are its uses in c programming?

1051


What is the usage of the pointer in c?

1101


If I have a char * variable pointing to the name of a function ..

1165


what is event driven software and what is procedural driven software?

2564