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

What is bash c?

552


What are the 32 keywords in c?

627


Explain the advantages of using macro in c language?

572


Who developed c language and when?

573


What is sizeof c?

604






1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

2736


What are c identifiers?

621


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2051


What is double pointer in c?

581


What is the meaning of && in c?

545


Explain what is wrong with this program statement? Void = 10;

761


What happens if a header file is included twice?

584


What do you mean by command line argument?

636


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1847


Why is python slower than c?

598