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

write a C program : To find out the number of identical words in two files . the file name should be taken as command line argument .

1 Answers   Subex,


What is meant by global static? why we have to use static variable instead of Global variable

4 Answers   L&T,


Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.

8 Answers  


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,


Write a c program to demonstrate character and string constants?

0 Answers  


read a number & print all its devisors using c-program?

3 Answers  


Write the Program to reverse a string using pointers.

0 Answers   InterGraph,


Who invented b language?

0 Answers  


What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation

10 Answers   IBM,


Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning

4 Answers   Accenture,


What tq means in chat?

0 Answers  


given post order,in order construct the corresponding binary tree

0 Answers   S-Cube, Wipro,


Categories