how to add two numbers without using arithmetic operators?

Answer Posted / shashishekar

#include<stdio.h>
#include<conio.h>
int main()
{
int a= 10;
int b=5;
int sum=0;
sum= a-(~b)-1;
printf(" sum= %d",sum);
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does #pragma once mean?

690


What is the auto keyword good for?

630


What is double pointer?

561


What are the similarities between c and c++?

601


Describe how arrays can be passed to a user defined function

785






Which programming language is best for getting job 2020?

608


What is main function in c?

551


What is the use of volatile?

611


Explain about the functions strcat() and strcmp()?

599


What is static memory allocation? Explain

633


c program to compute AREA under integral

1812


What is the right type to use for boolean values in c? Is there a standard type?

566


What is structure and union in c?

604


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2610


What are the applications of c language?

627