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 numbers without using arithmetic operators.

Answer Posted / mobashyr

#include<stdio.h>

int main()
{
int x=5,y=10; //Use scanf otherwise
int z=add(x,y);
return 0;
}

int add(int a,int b)
{
int i;
for(i=0;i<b;i++)
{
a++;
}
return a;
}

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is s or c?

1121


How do you initialize pointer variables?

1153


What are header files in c?

1122


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1431


Can we access array using pointer in c language?

1129


What is a floating point in c?

1126


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

1324


while initialization of array why we use a[][2] why not a[2][]...?

2404


What's the difference between constant char *p and char * constant p?

1193


What is a method in c?

1212


What does char * * argv mean in c?

1122


What is the difference between typedef struct and struct?

1168


For what purpose null pointer used?

1117


What is function what are the types of function?

1058


What are the different file extensions involved when programming in C?

1345