InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which one of the following is most appropriate description of “algorithm"1. Source code2. Executable image3. Object file4. Statements laying down a step-by-step execution of the programme |
|
Answer» Correct Answer - Option 4 : Statements laying down a step-by-step execution of the programme Explanation: Algorithms: An algorithm is a list of instructions or formulas for solving a problem, based on conducting a sequence of specified actions. The set of instructions can also be expressed independently of any programming language to solve a specific problem which is called an algorithm.
Hence, we conclude that an algorithm is a set by step execution of the programme intended to solve a specific problem. Hence option (4) is the correct answer. |
|
| 2. |
Write an algorithm to convert temperature from Celsius to Fahrenheit |
|
Answer» The algorithm for the conversion of temperature from Fahrenheit to Celsius is as follows:
The code for the same is - # include < stdio . h > # include < conio . h > void main ( ) { float a , b ; clr scr( ) ; printf(" Fahrenheit: "); scanf("%f", & b ); a = ( b - 32 ) * ( 5 / 9 ) ; printf(" \ n \ t % . 2b Fahrenheit = % . 2b Centigrade " , b , a ) ;
|
|