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.

Answers were Sorted based on User's Feedback



how to add numbers without using arithmetic operators...

Answer / dally

#include<stdio.h>
int main()
{
int a=3,b=5;
while(a--)
b = b++;

printf("%d\n");

}

Is This Answer Correct ?    2 Yes 8 No

how to add numbers without using arithmetic operators...

Answer / 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

how to add numbers without using arithmetic operators...

Answer / bijoy skaria

use ++ operator

Is This Answer Correct ?    3 Yes 13 No

how to add numbers without using arithmetic operators...

Answer / satish gaikwad

suppose a=6 and b=3

we can write c=a-(-b)
which will give us c=9

Is This Answer Correct ?    5 Yes 23 No

Post New Answer

More C Interview Questions

what is diffrence between string and character array?

1 Answers  


Identify the operators that is not used with pointer a. && b. # c. * d. >>

2 Answers  


how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?

2 Answers   Patni, TCS,


What is a MAC Address?

0 Answers  


Explain how can you determine the size of an allocated portion of memory?

0 Answers  


#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?

4 Answers   Ramco,


What is an operator?

0 Answers  


Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)

1 Answers  


what is constant pointer?

3 Answers  


Explain low-order bytes.

0 Answers  


biggest of two no's with out using if condition statement

8 Answers  


how to generate the length of a string without using len funtion?

4 Answers  


Categories