How to add two numbers without using arithmetic operators?
Answers were Sorted based on User's Feedback
Answer / ramanareddy
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the two numbers");
scanf("%d %d",%a,&b);
c=(-(-a-b));
printf("sum is = %d",c");
getch();
}
Is This Answer Correct ? | 0 Yes | 4 No |
Answer / abhishek shukla
what will be output of this programme?
#include<stdio.h>
#include<conio.h>
void main()
{
int a=5;
clrscr();
a=a+(2,3,3,5,8,6);
printf("%d",a);
getch();
}
Is This Answer Correct ? | 1 Yes | 6 No |
Answer / pugalarasu
int sum(int num1,int num2)
{
for(int i=0;i<num2;i++)
num1++;
return num1;
}
Is This Answer Correct ? | 39 Yes | 50 No |
Answer / ranjith
#include<stdio.h>
main()
{
int a=5,b=4,c;
c=a||b;
printf("sum="+c);
}
Is This Answer Correct ? | 2 Yes | 21 No |
Answer / suhas
# include <stdio.h>
main()
{
int a=8,b=2;
a|=b;
printf("sum="+a);
}
Is This Answer Correct ? | 7 Yes | 43 No |
Answer / kavi
#include<stdio.h>
int a,b,c;
{
printf("enter the two values");
scanf("%d","%d",&a,&b);
c=a||b;
}
Is This Answer Correct ? | 10 Yes | 80 No |
Answer / prashant
even this gives the same ans as the above program gives...
just every one plz check it and tell me
#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c;
printf("enter the nos");
scanf("%d %d",&b,&c);
a= (b^c);
printf("%d",a);
return 0;
}
Is This Answer Correct ? | 19 Yes | 114 No |
What is file in c preprocessor?
What is table lookup in c?
write a progam to display the factors of a given number and disply how many prime numbers are there?
WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What is the heap?
simple program of graphics and thier outpu display with a want what is out put of graohics in c language
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What does volatile do?
void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }
Explain how do you list files in a directory?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a<b,printb.find the sum digits of that number & then print.if a==b multiply 10 with a & add 20 with b store in c and then print