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 are preprocessor directives?

1 Answers  


WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE?

8 Answers   Carphone Warehouse, IBM, SAS,


which header file contains main() function in c?

17 Answers   Google, HCL, TCS,


write the program for maximum of the following numbers? 122,198,290,71,143,325,98

5 Answers  


what is the difference between class and unio?

0 Answers   HCL, Wipro,


What is a scope resolution operator in c?

0 Answers  


a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static Which of the Following Statements are true w.r.t Bit-Fields A)a,b&c B)Only a & b C)Only c D)All

3 Answers   Accenture, Digg.com,


Describe the difference between = and == symbols in c programming?

0 Answers  


State the difference between realloc and free.

0 Answers   Aricent,


Write a code to generate a series where the next element is the sum of last k terms.

0 Answers   Aspiring Minds,


What is formal argument?

0 Answers  


How to get string length of given string in c?

0 Answers  


Categories