English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

If C is false in line 2, trace the control flow in this algorithm. 1 S1 2 -- C is false 3 if C 4 S2 5 else 6 S3 7 S4 - Computer Science

Advertisements
Advertisements

Question

If C is false in line 2, trace the control flow in this algorithm.

1 S1

2 -- C is false

3 if C

4 S2

5 else

6 S3

7 S4

Short Note

Solution

The control flow for the given algorithm is as follows:
S1
S3
S4
The condition is false so it executes S3. In this case, S2 skipped.

shaalaa.com
Notations for Algorithms
  Is there an error in this question or solution?
Chapter 7: Composition and Decomposition - Evaluation - Section - C [Page 100]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 7 Composition and Decomposition
Evaluation - Section - C | Q 2. | Page 100
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×