SIZ EDUCATION ||Types Of Control Structure.

Control Structure.

A shape used to manipulate the float of execution in a application is known as Control Structure. The commands in a application may be prepared in 3 styles of manipulate systems to manipulate execution float. The manipulate systems are used to enforce this system logic.

Screenshot_2022_0121_152037.png

3jpR3paJ37V8JxyWvtbhvcm5k3roJwHBR4WTALx7XaoRovTMEVuVhsZAtMJA5fW4trAXLBzUJSf4ohQP6PePnxJajyH6bq6M2shg6LmfDgmeDAVS9tCwkqrsFguHUbz3WpKAn.png

Types of Control Structures.

Different sorts of manipulate systems are as follows.

Sequence Structure.

In sequential shape the statements are achieved withinside the equal order wherein they may be laid out in application. The manipulate flows from one declaration to different in a logical collection. All statements are achieved precisely as soon as. It method that no declaration is skipped and no declaration is achieved greater than as soon as.

SP_Sequence Control-1.png
Source

Example.

Suppose application inputs numbers and presentations common on display screen. The application makes use of statements to enter numbers, one declaration to calculate common and one declaration to show common number. These statements are achieved in a series to locate the common number. All statements are achieved as soon as while this system is achieved. It is an instance of collection manipulate shape.

Selection Structure.

A choice shape selects a declaration or set of statements to execute on the idea of a circumstance.In this shape, declaration or set of statements in achieved while a selected circumstance is authentic and overlooked while the circumstance is false. There are exclusive sorts of choice systems in C++ .These are if, if... else, and switch.

Screenshot_2022_0121_152548.png
Source

Example.

Suppose a application inputs the marks of a pupil and presentations a message on display screen whether or not the pupil is byskip or fail. It presentations byskip if the pupil receives forty or greater than forty marks. It presentations fail while the marks are beneath forty.The application checks the marks earlier than showing the message. It is an instance of choice shape.

Repetition Structure.

A repetition shape executes a declaration or set of statements repeatedly. It is likewise referred to as ieration shape or loop. There are exclusive sorts of repetition systems C++ .These are whilst, do whilst and #for.

image27.png
Source

Example .

Suppose we need to show a message "I love Pakistan"On display screen for a hundred times. It is time eating to carry out this undertaking the usage of manipulate collection shape. However, it's miles very smooth to carry out this undertaking the usage of repetition shape. A unmarried loop declaration can show the message a hundred times.

Function Call.

Function name is a form of declaration that actions the manipulate to any other block of codr. The manipulate returns lower back after executing all statements withinside the block. The closing statements achieved without delay after the feature name while the manipulate is returned.

c-function-calling-i-c-programming-language.png
Source

3jpR3paJ37V8JxyWvtbhvcm5k3roJwHBR4WTALx7XaoRovTMEVuVhsZAtMJA5fW4trAXLBzUJSf4ohQP6PePnxJajyH6bq6M2shg6LmfDgmeDAVS9tCwkqrsFguHUbz3WpKAn.png

Special Thanks To

@siz-official
@cryptokraze
@ashkhan

Best Regards by

@abdullah8

3jpR3paJ37V8JxyWvtbhvcm5k3roJwHBR4WTALx7XaoRovTMEVuVhsZAtMJA5fW4trAXLBzUJSf4ohQP6PePnxJajyH6bq6M2shg6LmfDgmeDAVS9tCwkqrsFguHUbz3WpKAn.png

Sort:  
 4 years ago 

Thank you so much for your attention in our community.

Try to join these clubs #club5050, #club75 and club100

Report,

Steemexclusive : Yes
Bit Bot : No
Club5050 : No
Plagiarism : No

Coin Marketplace

STEEM 0.08
TRX 0.29
JST 0.035
BTC 107869.41
ETH 3771.08
USDT 1.00
SBD 0.58