# MCQ IN COMPUTER SCIENCE & ENGINEERING

## COMPUTER SCIENCE AND ENGINEERING

### DATA STRUCTURES

 Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An algorithm can have no output.
 A TRUE B FALSE C Either A or B D None of the above
Explanation:

Detailed explanation-1: -If an algorithm doesn’t have an output, it is equivalent to the empty program. (There’s no way to observe internal computations, so a program that does the computation and discards it is for all intents and purposes equivalent with one that doesn’t perform the computations at all.)

Detailed explanation-2: -An algorithm has input values from a specified set. From each set of input values, an algorithm produces output values from a specified set. The output values are the solution to the problem.

Detailed explanation-3: -Output specified: An algorithm should have 1 or more well-defined outputs and should match with the expected output. If there will be any output at all, you have to know what kind of data and how much it should be.

Detailed explanation-4: -Any algorithm is a program. Explanation: The statement is false. An algorithm is represented in the form of a programming language is called a program. Any program is an algorithm but the reverse is not true.

Detailed explanation-5: -Algorithms produce a result In our simple definition of an algorithm, we stated that an algorithm is a set of instructions for solving a problem. Unless an algorithm produces some result, we can never be certain whether our solution is correct.

There is 1 question to complete.