How to add two numbers without using arithmetic operators?
Answer Posted / pakalapati vijaya rama raju
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c=1;
clrscr();
printf("enter the two numbers");
scanf("%d%d",&a,&b);
while(c<=b)
{
a++;
c++;
}
printf("%d",a);
getch();
}
| Is This Answer Correct ? | 16 Yes | 4 No |
Post New Answer View All Answers
What does the message "automatic aggregate intialization is an ansi feature" mean?
What are the advantages of using linked list for tree construction?
What 'lex' does?
What is variable and explain rules to declare variable in c?
Can a variable be both constant and volatile?
Explain what is wrong with this program statement?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What the different types of arrays in c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
What is optimization in c?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What does the function toupper() do?
Explain what is the benefit of using #define to declare a constant?
What is an expression?
Why should I prototype a function?