write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview
Answer Posted / shruti
In binary search , we have sorted array.
Hence the last number in the array is the largest number
among the given list.. :-)
Ur interviewer has to be very intelligent.. :-)
Gud ques though..
| Is This Answer Correct ? | 18 Yes | 5 No |
Post New Answer View All Answers
How can I read in an object file and jump to locations in it?
What is use of bit field?
What is oops c?
What is meant by type casting?
What is a ternary operator in c?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Write a program to print all permutations of a given string.
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What is indirection in c?
Do character constants represent numerical values?
What is structure padding in c?
What is difference between && and & in c?
Explain what is output redirection?
What is the purpose of type declarations?