How to add two numbers without using arithmetic operators?

Answer Posted / jayanth kothapalli

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

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are the variables argc and argv are local to main?

778


Explain what are run-time errors?

601


What is the difference between union and structure in c?

564


What is bubble sort technique in c?

579


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

616






When can you use a pointer with a function?

555


What are local static variables? How can you use them?

635


What is a pointer variable in c language?

637


Why pointers are used in c?

576


How can I call a function with an argument list built up at run time?

621


Can the sizeof operator be used to tell the size of an array passed to a function?

608


What is the general form of #line preprocessor?

577


Can a program have two main functions?

563


What does double pointer mean in c?

567


Why is c called a structured programming language?

664