














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Covers The Basic of C Programming Conditionals
Typology: Summaries
1 / 22
This page cannot be seen from the preview
Don't miss anything!















Conditional Statements in C
_ . "Diesen ee i nt CONTENT INTRODUCTION IF CONDITION IF ELSE CONDITION NESTED IF ELSE CONDITION LADDER ELSE IF CONDITION SWITCH CASE CONDITION BREAK STATEMENT GOTO LABEL STATEMENT CONTINUE STATEMENT IF CONDITION It is conditional statement, which is used to execute a set of statement on some conditions. The condition must be of Boolean type expression. An expression, which returns only two value either TRUE or FALSE, is known as Boolean type expression. Syntax: - if (condition) Irrue { Body of if ALATA PAPAS EEE EES Sttenent jun v Figure: Flowchart of if Statement In Another Words, It Can Also Be Said As Single Blocked Conditional Statements In Which Only One Part Is Mentioned. That Is Known As TRUE Part. IF ELSE CONDITION It Is Known As Double Blocked Conditional Statements .It Means, It Has TRUE Parts As Well As FALSE Part. If The Given Condition Is True Then The True Part Is Executed Otherwise False Part Is Executed. SYNTAX; - Ie (CONDITION) Seececceecceecvecces } ELSE { } False expression ‘True y Body of if Body of else i y Statement just below if..else y Figure: Flowchart of if...else Statement NESTED IF ELSE Using Of One If Statement Within Another If Statement Is Known As Nested Of If else Statement. syntax- Ty Ce ) } { else VEE. { If (cossess-.) TH eee eee Q: -_ WAP to input two numbers and print the greatest numbers. #include