SIZ Education || what are statements in C language || 27 /10/2021 ||

in Steem Infinity Zone3 years ago

Hello my dear friends how are you all I hope that by the grace of Allah Almighty you will all be well and live your life happily. Today I am here to tell you what are statements in C language . I hope my this post helps you a lot to understand statements in C languages .

20211027_004832.jpg

RGgukq5E6HBM2jscGd4Sszpv94XxHH2uqxMY9z21vaqHt4sBzPs77pScRoPrApzn5F5oev54QbyTCt4YntxDSSmwb6Mnv7sHKcWuvagPFRYaidXZ3YBMv63BifW1Hne.png

💠 WHAT IS STATEMENT

A statement is a command issued to the computer that tells it to do something specific, such as display something on the screen or gather data. A succession of assertions make up a computer programme.

🔵 SOME TYPES THAT WE DISSCUSS TODAY:

  • IF ELSE STATEMENT
  • ELSE..IF STATEMENT
  • NESTED IF..ELSE STATEMENT

💠 IF ELSE STATEMENT

In C, the if-else statement is used to carry out operations based on a **set of conditions??. If and only if the supplied condition is true, the operations stated in the if block are executed.

SYNTAX OF IF ELSE:-

if(condition) {
Statements
}

else {
Statements
}
getch();

If the condition is true, the words in the body of the “if” statement are performed, while the statements in the body of the “else” statement are bypassed.If the condition is false, the words in the body of the "if" are skipped and the statements in "otherwise" are performed.

RGgukq5E6HBM2jscGd4Sszpv94XxHH2uqxMY9z21vaqHt4sBzPs77pScRoPrApzn5F5oev54QbyTCt4YntxDSSmwb6Mnv7sHKcWuvagPFRYaidXZ3YBMv63BifW1Hne.png

WORKING:-

C_language_if_else.png
Source

💠 ELSE..IF STATEMENT

When you need to verify numerous conditions within a programme, the else..if statement comes in handy. It allows you to avoid layering of if-else blocks.

SYNTAX OF ELSE..IF:-
if (condition1)

{
These statements run if the condition1 is true
}

else if(condition2)
{
These statement run if the condition 2 is true
}

else if (condition3)

{

These statements run if the condition 3 is true

}
.
.
else
{
These statements run if all the conditions return false
}

getch();

RGgukq5E6HBM2jscGd4Sszpv94XxHH2uqxMY9z21vaqHt4sBzPs77pScRoPrApzn5F5oev54QbyTCt4YntxDSSmwb6Mnv7sHKcWuvagPFRYaidXZ3YBMv63BifW1Hne.png

WORKING:-

decision-making-c-2.png
Source

💠 NESTED ELSE..IF STATEMENT

Nested if else is when an if else statement appears within the body of another "if" or "else" statement.

SYNTAX OF NESTED ELSE..ID :-

if(condition)
{
Nested if else in if

if(condition2)
{
Statements
}
else {
Statements

}
}
else {
Statements
}

getch();

RGgukq5E6HBM2jscGd4Sszpv94XxHH2uqxMY9z21vaqHt4sBzPs77pScRoPrApzn5F5oev54QbyTCt4YntxDSSmwb6Mnv7sHKcWuvagPFRYaidXZ3YBMv63BifW1Hne.png

WORKING:-

decision-making-c-3.png
Source

20210911_082344.png

Other Details:-

TopicWHAT ARE STATEMENTS IN C LANGUAGE
COMMUNITYSTEEM INFINITY ZONE
Location(OKARA) PAKISTAN
AURTHOR@malikusman1 ME
AURTHOR PICTURE20210605_221808.jpg

💠 MY ACHIEVEMENT 1

https://steemit.com/hive-172186/@malikusman1/achievement-1-by-introduction-malikusman1

THANKS FOR YOUR SUPPORT DEAR SIZ TEAM
Cc.-
@cryptokraze
@siz-official
@vvarishayy
@arie.steem
@suboohi

ALLAH HAFIZ 🥰

20210911_082406.png

Sort:  
 3 years ago 

Good working dear friend keep it up bro and keep learn with our steem fellows.
Regards, Faran Nabeel

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.029
BTC 61952.36
ETH 2417.96
USDT 1.00
SBD 2.64