How to add two numbers without using arithmetic operators?

Answer Posted / chirantan

//program to add two numbers without using + operator//
#include<stdio.h>
main()
{
int a,b,c;
printf("\n enter two numbers to add\n");
scanf("%d %d", &a,&b);
c=((a*a)-(b*b))/(a-b);
}

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is keyword in c?

587


What is the process of writing the null pointer?

600


Can you explain the four storage classes in C?

635


Why do we use static in c?

627


How is a macro different from a function?

648






How do I use strcmp?

629


How can I insert or delete a line (or record) in the middle of a file?

564


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2027


Explain how to reverse singly link list.

597


Write the Program to reverse a string using pointers.

609


What is data structure in c and its types?

583


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1657


Why can't I perform arithmetic on a void* pointer?

628


What is the difference between a free-standing and a hosted environment?

634


If fflush wont work, what can I use to flush input?

601