answersLogoWhite

0

The output of a binary search routine is either (usually) the address of the element that matched the search term, or, if there was no match, the address of where the new element should be placed. Of course, this means that there are two outputs, one, an address, and two, whether or not the search term was found; which means that a single valued function will not suffice - it is necessary that one of the parameters be an address, perhaps of the flag variable.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What are the advantages and disadvantages of searching in C programming?

If the data is sorted and every element is directly accessible, then you can perform binary search (see built-in function bsearch), otherwise you have to do linear search (which is slower).


What is printing out and inputting variable in C programming?

input and output


What are the examples of middle level programming language?

binary language


How is the code return in higher programming languages like C and C converted into binary language?

By using a compiler.


What do you mean by non primitive data structure in C programming?

What do you mean by searching in data structure in C.?


What are the different modes in C programming language?

In C programming language, there are three main modes: text mode, binary mode, and append mode. Text mode is used for reading and writing text files, binary mode is used for reading and writing binary files, and append mode is used for appending data to the end of a file.


Does c language support network programming?

The C language supports whatever functionality is provided by the applicable library, by the programmer, and by the input/output capabilities of the platform. Since a network programming library is available to the c compiler, then yes, the c language supports network programming.


What is the use of c compiler in windows?

The c compiler in Windows converts the binary code from source files. C is a compiled programming language and it needs to be converted for the program to run.


How do you get the output of a three input binary truth table A B C?

by analyzing your three input logic network


What are file modes in c plus plus?

I guess you mean either input/output/inout/append or binary/text.


Design a combinational circuit that accepts a three bit number and generates a binary output equal to twice the input value?

There is no need for a combinatorial circuit to multiply a number by two. A binary number, left shifted one place, is twice the original binary number. The specific answer to the question is that you would connect the three input lines to the three high order output line of four output lines, and connect the low order bit of the four output lines to logic 0. If the three input lines were labelled A, B, and C, the output would be A, B, C, and 0.


How are input and output functions are accessed in C programming?

The most common way to invoke an input/output function is calling it by its name. Example with function puts:puts ("Hello world");