Computer Applications
Define the following:
(a) Normal flow of control
(b) Conditional flow of control
Input in Java
16 Likes
Answer
(a) Normal flow of control
It is a sequential movement of the control from one statement to another from beginning to the end of the program. It is the simplest way of executing a program, where there is no restriction on flow of control during the process.
(b) Conditional flow of control
Sometimes, it may happen that a statement or a set of statements is executed only when a given condition results in true. However, if the condition results in false, then these statements are ignored and the control moves forward to the next statement of the program. This type of flow of control is known as the conditional flow of control and the statements are known as the decision making statements.
It can be achieved by using the following statements:
- if statement
- if-else statement
- if-else-if statement
Answered By
10 Likes
Related Questions
Write the syntax of 'if' statement.
What are the different types of errors that take place during the execution of a program?
What is a compound statement? Give an example.
Write down the syntax of the following with reference to Java Programming:
(a) to accept an integer value using main( )
(b) to accept a fractional number using main( )