write a c program to add two integer numbers without using
arithmetic operator +
Answer Posted / praveenkumar
main()
{
int a,b,c;
printf("enter a,b values:");
scanf("%d%d",&a,&b);
c=((a)-(-b));
printf("a+b="&c);
}
Is This Answer Correct ? | 66 Yes | 3 No |
Post New Answer View All Answers
How to create struct variables?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What is local and global variable in c?
How is null defined in c?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
What is the use of #include in c?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Tell me the use of bit field in c language?
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);
What are enumerated types?
How is = symbol different from == symbol in c programming?
What is the significance of c program algorithms?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Lists the benefits of c programming language?
What is the correct declaration of main?