Write a C program to multiply tho numbers without using
arithmetic operator (+, -, *, /).
Answer / taz
int a=5,b=2,c,i,j;
for(i=1;i<=a;i++)
for(j=1;j<=b;j++)
c++;
printf("%d",c);
| Is This Answer Correct ? | 5 Yes | 1 No |
Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
5 Answers Vector, Vector Solutions,
What is a memory leak in structures? How can we rectify that?
What is the use of a conditional inclusion statement in C?
What are the keywords in c?
what do the 'c' and 'v' in argc and argv stand for?
Is null a keyword in c?
difference between my-strcpy and strcpy ?
3 Answers Geometric Software, IIM, Infosys,
write a program to print the all 4digits numbers & whose squares must me even numbers?
What is the need of structure in c?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
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<n1-1;i++) { if( !( (a1[i]>a1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }