Computer Science, asked by singhakansha445, 2 months ago

1. Write the general form of switch statement.
2. Differentiate between if and switch statement.
3. Differentiate between entry Control and exit Control loop.
4. Differentiate between break and continue statement.
5. What is a block ?​

Answers

Answered by dakshposwal3
8

Answer:

2. question

okk

Explanation:

The if statement evaluates integer, character, pointer or floating-point type or boolean type. On the other hand, switch statement evaluates only character or an integer datatype. Sequence of execution is like either statement under if block will execute or statements under else block statement will execute.

techdifferences.com › difference-bet...

Difference Between


singhakansha445: where are rest of the answers ?
Answered by Anonymous
3

1. A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case.

2. The if statement evaluates integer, character, pointer or floating-point type or boolean type. On the other hand, switch statement evaluates only character or an integer datatype. Sequence of execution is like either statement under if block will execute or statements under else block statement will execute.

3. Entry controlled loop is a loop in which the test condition is checked first, and then loop body will be executed. Exit controlled loop is a loop in which the loop body is executed first and then the given condition is checked afterwards. If the test condition is false, loop body will not be executed.

4. Break statement resumes the control of the program to the end of loop and made executional flow outside that loop. Continue statement resumes the control of the program to the next iteration of that loop enclosing 'continue' and made executional flow inside the loop again.

5. In computing (specifically data transmission and data storage), a block, sometimes called a physical record, is a sequence of bytes or bits, usually containing some whole number of records, having a maximum length; a block size. Data thus structured are said to be blocked.

Similar questions