How to add two numbers without using arithmetic operators?

Answer Posted / ramanareddy

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

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a progrmm in c language take user interface generate table using for loop?

1810


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1723


Where are local variables stored in c?

782


write a program to print largest number of each row of a 2D array

2103


hi send me sample aptitude papers of cts?

1908


How do I determine whether a character is numeric, alphabetic, and so on?

879


Explain how can a program be made to print the name of a source file where an error occurs?

958


how can f be used for both float and double arguments in printf? Are not they different types?

838


How can you determine the maximum value that a numeric variable can hold?

909


Why main function is special give two reasons?

1233


write a c program to find the sum of five entered numbers using an array named number

1888


What is the explanation for prototype function in c?

765


Explain what is the difference between text files and binary files?

875


What is main return c?

752


code for find determinent of amatrix

1746