Jumping Statements:

https://drive.google.com/file/d/1U9sYX33X1tzGqnRMbrnUuXQB8uJjbJlk/view?usp=sharing

https://drive.google.com/file/d/1f1UYWItGjVoDHo9WeLqDm7nRWLRlVePB/view?usp=sharing

https://drive.google.com/file/d/1AwqJEzzMaoQL_F9ufOQExdYWtukgc430/view?usp=sharing

https://drive.google.com/file/d/1RAwKTsnjgfyRETxpiCMuNGkIFWZtfpSm/view?usp=sharing

https://drive.google.com/file/d/13fcVGyU0koFNKebqKrIw2EzuWNn_PawE/view?usp=sharing

 PST-pdf                    Instagram                              Twitter                        YouTube

{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{

}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

--------------------------------------------------------------------------------------------------------------------

1. INTRODUCTION  PST-PDF

-------------------------------------------------------------------------------------------------------------------

2. OPERATORS   PST-pdf

-------------------------------------------------------------------------------------------------------------------

3. LOOPING  PST-pdf

------------------------------------------------------------------------------------------------------------------

4. CONDITIONAL  PST-pdf

------------------------------------------------------------------------------------------------------------------

5. JUMPING STATEMENTS

------------------------------------------------------------------------------------------------------------------
5.1 Break 
break is a keyword in C programming language and it is used with two statements:
Looping statements (for, while and do while) - break is used to break (terminate) the execution of loop body and transfers the program’s control to the next statement written after the loop body.

Switch case statement - break is used to transfer the program’s control from switch statement body to the next statement written after the switch.

Here, is the syntax of break statement with loop statement in C programming:

for (counter_initialization; test_condition; counter_increment)
{
//statement(s)
if(test_condition)
break;
//statement(s)
}
//outer statement(s)

If the test_condition written within the loop body is true (non zero) value, execution of loop will be stopped and program’s control will move to outer statement(s).

For Programming Training:
DM me Instagram

5.2 Continue 
continue is a keyword in C programming language and it is used to transfer the program’s control to starting of loop. It continues the execution of loop without executing the statements written after continue within the loop body.

Syntax: 
for (counter_initialization; test_condition; counter_increment)
{
//statement(s)
if(test_condition)
continue;
//statement(s)
}

If the test_condition written within the loop body is true (non zero) value, statement(s) written after the continue will not print and program’s control will move to the beginning.


For Programming Training:
DM me Instagram

 5.3 Goto
goto is a jumping statement in c language, which transfer the program’s control from one statement to another statement (where label is defined).

goto can transfer the programs within the same block and there must a label, where you want to transfer program’s control.

Defining a label Syntax:
label_name:
label_name should be a valid identifier name.
: (colon) should be used after the label_name.
Transferring the control using goto

Programs control can be transfer following by the given syntax goto label_name;

Two styles of goto statement
We can use goto statement to transfer programs control from down to top (?) and top to down (?).

Style 1 (Down to Top)
label-name:
statement1;
statement2;
..
if(any-test-condition)
goto label-name;

Here, if any-test-condition is true, goto will transfer the programs control to the specified label-name.

Style 2 (Top to Down)
statements;
if(any-test-condition)
goto label-name;
statement1;
statement2;
label-name:
Other statements;

Here, if any-test-condition is true, goto will transfer the programs control to the specified label-name.


For Programming Training:
DM me Instagram

---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
BCA                                        PST & Programming C                                   Allrounder Sita Ram Sahu
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
>

No comments:

Post a Comment