Give a fast way to multiply a number by 7

Answer Posted / anu

Both answers have slight mistakes in them.
x *7 = ( x<<3 ) - x , which is equivalent to (x* 8 ) -x

Is This Answer Correct ?    65 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by scope of a variable in c?

542


Not all reserved words are written in lowercase. TRUE or FALSE?

719


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;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

2710


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

665


What is a structure in c language. how to initialise a structure in c?

603






What are the 4 types of organizational structures?

621


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1459


What is the use of a ‘’ character?

582


Is c is a low level language?

559


What is the use of typedef in structure in c?

538


Explain what is the concatenation operator?

621


What type of function is main ()?

581


how to write optimum code to divide a 50 digit number with a 25 digit number??

2747


What is a floating point in c?

598


will u please send me the placement papers to my mail???????????????????

1359