write a c program to add two integer numbers without using
arithmetic operator +

Answers were Sorted based on User's Feedback



write a c program to add two integer numbers without using arithmetic operator +..

Answer / jithender palle(vaagdevi wgl)

main()
{
int a=10,b=30,c;
c=a|b;
printf("%d",c);
}

Is This Answer Correct ?    8 Yes 21 No

write a c program to add two integer numbers without using arithmetic operator +..

Answer / reddy

(a+b)=square root([(4ab)+[(a-b)(a-b)]])

Is This Answer Correct ?    8 Yes 31 No

write a c program to add two integer numbers without using arithmetic operator +..

Answer / anbuchristi

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("\n Enter The Number:");
scanf("%d",&a);
printf("\n Enter the Number:");
scanf("%d",&b);
c=a+b;
printf("\n The Result Is");
printf("\n ~~~ ~~~~~~ ~~");
printf("%d",c);
getch();
}

Is This Answer Correct ?    20 Yes 74 No

Post New Answer

More C Interview Questions

What is wild pointer in c with example?

0 Answers  


Can main () be called recursively?

0 Answers  


how to create c progarm without void main()?

1 Answers   NIIT,


Explain can static variables be declared in a header file?

0 Answers  


Do pointers store the address of value or the actual value of a variable?

0 Answers   Fidelity,






Explain pointer. What are function pointers in C?

0 Answers   HCL,


What are actual arguments?

0 Answers  


program for following output using for loop? 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5

8 Answers   Infosys,


Can you please explain the difference between syntax vs logical error?

0 Answers  


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

0 Answers  


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

0 Answers   Microsoft,


Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv

6 Answers   Accenture,


Categories