1.

Which of the given function is used for searching?(a) lsearch()(b) bsearch()(c) csearch()(d) qsearch()This question was posed to me during an interview for a job.My doubt is from General Utilities in chapter C Library of C

Answer»

The correct answer is (b) bsearch()

To EXPLAIN I WOULD say: bsearch() FUNCTION is USED tosearch an array of objects, the initial ELEMENT is pointed by base, for an element that matches the object is pointedby key. The size of each element of the array is specified by size.



Discussion

No Comment Found

Related InterviewSolutions