write a c program to add two integer numbers without using
arithmetic operator +
Answer Posted / sivaprabhu
main()
{
int a,b,c;
printf("enter the values a,b");
scanf("%d%d",&a,&b);
c=a-(~b)-1;
printf("the sum is %d",c);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why does the call char scanf work?
What is the explanation for the dangling pointer in c?
Can the sizeof operator be used to tell the size of an array passed to a function?
What is the description for syntax errors?
What are global variables?
What is 1d array in c?
I have a varargs function which accepts a float parameter?
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
What is time complexity c?
what is bit rate & baud rate? plz give wave forms
What will be your course of action for a push operation?
What is main return c?
Explain how many levels deep can include files be nested?
Are pointers really faster than arrays?
Explain how do you print an address?