Write a C function to search a number in the given list of
numbers. donot use printf and scanf

Answer Posted / vignesh1988i

ya..... sorry... it wont work... since getchar gets only one
character the time.... when we give 48... i will take 4 and
8 .. but not as 48.... sorry for posting it... a lesson i
have learnt

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What functions are used in dynamic memory allocation in c?

585


Explain what is gets() function?

618


What is the method to save data in stack data structure type?

598


What is wrong with this statement? Myname = 'robin';

810


Can we declare variables anywhere in c?

569






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 }

2704


What are the advantages and disadvantages of a heap?

697


What is operator promotion?

619


How do you declare a variable that will hold string values?

660


What are the rules for the identifier?

660


what is the height of tree if leaf node is at level 3. please explain

1591


What are the functions to open and close the file in c language?

587


How will you delete a node in DLL?

674


What oops means?

572


What is the meaning of 2d in c?

601