How to add two numbers without using arithmetic operators?

Answer Posted / pakalapati vijaya rama raju

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

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

910


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

2228


given post order,in order construct the corresponding binary tree

2525


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

1904


What is the explanation for the dangling pointer in c?

881


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1656


Explain about block scope in c?

848


What is c language used for?

718


If you know then define #pragma?

857


Is printf a keyword?

953


Does sprintf put null character?

784


What is meant by keywords in c?

833


What are directives in c?

732


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1119


Where in memory are my variables stored?

826