how to add two numbers without using arithmetic operators?

Answer Posted / rajkumar

#include<stdio.h>
#include<conio.h>
void main()
{
int a=6,b=3,sum=0;
sum=a^b;
printf("sum=%d",sum);
getch();
}

Is This Answer Correct ?    3 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between far and near pointers?

599


What is #line used for?

572


What does int main () mean?

539


What do you mean by dynamic memory allocation in c?

642


What is the difference between exit() and _exit() function?

596






how logic is used

1493


Explain how can I right-justify a string?

616


What does a function declared as pascal do differently?

600


What is the code for 3 questions and answer check in VisualBasic.Net?

1682


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

622


How can I do graphics in c?

586


Write a program to check armstrong number in c?

631


What are the restrictions of a modulus operator?

628


Can a function argument have default value?

664


What happens if you free a pointer twice?

599