if else statement in C (Hands-on) | C Programming

Описание к видео if else statement in C (Hands-on) | C Programming

In this video, you will learn how if-else statement in C works. By the end of this video, you will be able to use if-else statement in your C Programs.

Syntax of C if-else statement:
if (condition){
/*1st block of statements*/
}
else{
/*2nd block of statements*/
}

Here, "if" and "else" are keywords in C. Condition enclosed within round brackets can be any expression that evaluates to true or false.
If the condition evaluates to TRUE, 1st block of statements enclosed with-in curly braces of "if" keyword will be executed.
If the condition evaluates to FALSE, 2nd block of statements enclosed with-in curly braces of "else" keyword will be executed.

The keyword if tells the compiler that what follows is decision control statement. The block of statements to be executed must be enclosed in opening and closing braces. If only one statement needs to be executed then braces need not be used.

Interested in learning C programming language? Here is the FREE C Programming 5-Day Challenge for you - https://www.aptuts.com/c-programming-...

#ifElseC #CProgramming #aptuts

Комментарии

Информация по комментариям в разработке