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 does 3 periods mean in texting?

803


a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);

860


What is the importance of c in your views?

805


Explain enumerated types in c language?

786


What Is The Difference Between Null And Void Pointer?

849


What is a stream water?

892


What is indirection? How many levels of pointers can you have?

906


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

1019


What is the acronym for ansi?

803


How are 16- and 32-bit numbers stored?

971


What is the scope of an external variable in c?

770


How many levels of indirection in pointers can you have in a single declaration?

827


How do you initialize pointer variables?

799


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

987


Explain the use of #pragma exit?

906