Presentation is loading. Please wait.

Presentation is loading. Please wait.

C-Language Lecture By B.S.S.Tejesh, S.Neeraja

Similar presentations


Presentation on theme: "C-Language Lecture By B.S.S.Tejesh, S.Neeraja"— Presentation transcript:

1 Mailid: tejeshbss@gmail.com, neeru8416@gmail.com
C-Language Lecture By B.S.S.Tejesh, S.Neeraja Asst.Prof, Open Source Developers Mailid:

2 Contents Control Statements if if else Nesting of if else
else if ladder switch Example programs

3 if Syntax: Description:
if(expression) statement1; Description: In these type of statements, if condition is true, then respective block of code is executed. It Checks whether the given Expression is Boolean or not !! If Expression is True Then it executes the statement otherwise jumps to next_instruction

4

5

6

7 if demonstration

8 if else statement Also called as bi-directional selection control statement. Mainly used for taking one of the two possible actions. Description: In these type of statements, group of statements are executed when condition is true.  If condition is false, then else part statements are executed.

9

10

11

12 Nested if else We can have another if... else statement in the if block or the else block. This is called nesting of if …else statements. If condition 1 is false, then condition 2 is checked and statements are executed if it is true. If condition 2 also gets failure, then else part is executed.

13 Syntax:

14

15 else if ladder This is a type of nesting in which there is an if. .. else statement in every else part except the last else part. This type of nesting is frequently used in programs and is also known as else if ladder.

16 ex1

17 ex2

18

19 Programs


Download ppt "C-Language Lecture By B.S.S.Tejesh, S.Neeraja"

Similar presentations


Ads by Google