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

Answers were Sorted based on User's Feedback



How to add two numbers without using arithmetic operators?..

Answer / ramanareddy

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the two numbers");
scanf("%d %d",%a,&b);
c=(-(-a-b));
printf("sum is = %d",c");
getch();
}

Is This Answer Correct ?    0 Yes 4 No

How to add two numbers without using arithmetic operators?..

Answer / abhishek shukla

what will be output of this programme?
#include<stdio.h>
#include<conio.h>
void main()
{
int a=5;
clrscr();
a=a+(2,3,3,5,8,6);
printf("%d",a);
getch();
}

Is This Answer Correct ?    1 Yes 6 No

How to add two numbers without using arithmetic operators?..

Answer / nitish

why cant we just or the two numbers

Is This Answer Correct ?    9 Yes 20 No

How to add two numbers without using arithmetic operators?..

Answer / pugalarasu

int sum(int num1,int num2)
{
for(int i=0;i<num2;i++)
num1++;
return num1;
}

Is This Answer Correct ?    39 Yes 50 No

How to add two numbers without using arithmetic operators?..

Answer / ranjith

#include<stdio.h>
main()
{
int a=5,b=4,c;
c=a||b;
printf("sum="+c);
}

Is This Answer Correct ?    2 Yes 21 No

How to add two numbers without using arithmetic operators?..

Answer / suhas

# include <stdio.h>
main()
{
int a=8,b=2;
a|=b;
printf("sum="+a);
}

Is This Answer Correct ?    7 Yes 43 No

How to add two numbers without using arithmetic operators?..

Answer / kavi

#include<stdio.h>
int a,b,c;
{
printf("enter the two values");
scanf("%d","%d",&a,&b);
c=a||b;
}

Is This Answer Correct ?    10 Yes 80 No

How to add two numbers without using arithmetic operators?..

Answer / prashant

even this gives the same ans as the above program gives...
just every one plz check it and tell me
#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c;
printf("enter the nos");
scanf("%d %d",&b,&c);
a= (b^c);
printf("%d",a);
return 0;
}

Is This Answer Correct ?    19 Yes 114 No

Post New Answer

More C Interview Questions

What are the advantages of c language?

0 Answers  


write a program to add two numbers of any size.....(remember any size)

1 Answers  


what is ur strangth & weekness

0 Answers   Cognizant, LG Soft, NetEnrich,


what is the difference between global variable & static variable declared out side all the function in the file.

2 Answers  


What is structure of c program?

0 Answers  


What is local and global variable in c?

0 Answers  


What is c language and why we use it?

0 Answers  


Sir i need notes for structure,functions,pointers in c language can you help me please

0 Answers   TCS,


to find out the reverse digit of a given number

6 Answers   Infosys, Microsoft, TCS, Wipro,


what is the different between data structure and data type?

1 Answers   Ignou,


Write a small C program to determine whether a machine's type is little-endian or big-endian.

5 Answers   nvidia,


swap two integer variables without using a third temporary variable?

6 Answers   Persistent,


Categories