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

Why is c not oop?

533


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

635


Write a C program to count the number of email on text

1412


What does the format %10.2 mean when included in a printf statement?

1079


the question is that what you have been doing all these periods (one year gap)

1614






How do you determine whether to use a stream function or a low-level function?

640


what type of questions arrive in interview over c programming?

1549


What are qualifiers in c?

568


4. main() { int c=- -2; printf("c=%d",c); }

1364


Explain the difference between #include "..." And #include <...> In c?

621


What is dynamic variable in c?

557


What is the difference between far and near in c?

593


What is maximum size of array in c?

578


main() { printf("hello"); fork(); }

687


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1423