if array a conatins 'n' elements and array b conatins 'n-1'
elements.array b has all element which are present in array
a but one element is missing in array b. find that
element.
Answer Posted / rahul
define one variable say t_max and save a[0] in that,loop
through it, if a[1] is grater than a[0] save a[1] in t_max
otherwisw a[0] remain as it is....check it same way for all
elemnts in array...finally t_max will hold max elemnt from
array.
| Is This Answer Correct ? | 2 Yes | 11 No |
Post New Answer View All Answers
What is c language & why it is used?
Is c language still used?
Why do we use main function?
What are the types of data files?
Can we initialize extern variable in c?
What is the use of typedef in structure in c?
Define circular linked list.
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Explain what is the benefit of using enum to declare a constant?
What is variable initialization and why is it important?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What is the purpose of clrscr () printf () and getch ()?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What is build process in c?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration