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...

write a c program to add two integer numbers without using
arithmetic operator +

Answer Posted / sushma sarma

#include<iostream.h>
int main()
{
int a,b;
cout<<"Enter a and b";
cin>>a;
cin>>b;
while(a!=0)
{
++b;
a--;
}
cout<<b;
return 0;
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

2104


In which language linux is written?

1166


Tell me the use of bit field in c language?

1015


Why is c called a mid-level programming language?

1148


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1018


What is #include stdio h?

1058


Where local variables are stored in c?

953


What is 1f in c?

2569


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2401


Is there a way to switch on strings?

1027


What are the __date__ and __time__ preprocessor commands?

1034


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2255


Write a program in c to replace any vowel in a string with z?

1072


How is a macro different from a function?

1114


What are categories used for in c?

1034