This document discusses control flow statements in C programming. It defines control flow statements as blocks of code that control the flow of a program. There are three main types: branching/decision making statements, iterative/looping statements, and jumping statements. Branching statements include if, else if, switch case, and conditional operators. Looping statements include while, for, and do while loops. Jumping statements are break, continue, and goto. Examples are provided for each statement type to illustrate their syntax and usage.
Selection Statements
Using if and if...else
Nested if Statements
Using switch Statements
Conditional Operator
Repetition Statements
Looping: while, do, and for
Nested loops
Using break and continue
Operators and expressions in c languagetanmaymodi4
what is operator in c language
uses of operator in c language
syatax of operator in c language
program of operator in c language
what is expressions in c language
use of expressions in c language
syantax of expressions in c language
Selection Statements
Using if and if...else
Nested if Statements
Using switch Statements
Conditional Operator
Repetition Statements
Looping: while, do, and for
Nested loops
Using break and continue
Operators and expressions in c languagetanmaymodi4
what is operator in c language
uses of operator in c language
syatax of operator in c language
program of operator in c language
what is expressions in c language
use of expressions in c language
syantax of expressions in c language
In this presentation slides you will able to understand easily ,this slides contain loops of c++ programming language which contain for loop , while loop , do while loop and nested these all are describe with definition,examples and flow charts
View study notes of Function overloading .you can also visit Tutorialfocus.net to get complete description step wise of the concerned topic.Other topics and notes of C++ are also explained.
In this module of python programming you will be learning about control statements. A control statement is a statement that determines whether other statements will be executed. An if statement decides whether to execute another statement, or decides which of two statements to execute. A loop decides how many times to execute another statement.
Introduction to control structure in C Programming Language include decision making (if statement, if..else statement, if...else if...else statement, nested if...else statement, switch...case statement), Loop(for loop, while loop, do while loop, nested loop) and using keyword(break, continue and goto)
Presentation on C++ Programming Languagesatvirsandhu9
It consists information about c++ programming language which is a object oriented language. This presentation is very useful for those who want to learn c++ from beginning.
Command-line arguments are given after the name of the program in command-line shell of Operating Systems.
To pass command line arguments, we typically define main() with two arguments : first argument is the number of command line arguments and second is list of command-line arguments.
Importance of loops in any programming language is immense, they allow us to reduce the number of lines in a code, making our code more readable and efficient.
In this presentation slides you will able to understand easily ,this slides contain loops of c++ programming language which contain for loop , while loop , do while loop and nested these all are describe with definition,examples and flow charts
View study notes of Function overloading .you can also visit Tutorialfocus.net to get complete description step wise of the concerned topic.Other topics and notes of C++ are also explained.
In this module of python programming you will be learning about control statements. A control statement is a statement that determines whether other statements will be executed. An if statement decides whether to execute another statement, or decides which of two statements to execute. A loop decides how many times to execute another statement.
Introduction to control structure in C Programming Language include decision making (if statement, if..else statement, if...else if...else statement, nested if...else statement, switch...case statement), Loop(for loop, while loop, do while loop, nested loop) and using keyword(break, continue and goto)
Presentation on C++ Programming Languagesatvirsandhu9
It consists information about c++ programming language which is a object oriented language. This presentation is very useful for those who want to learn c++ from beginning.
Command-line arguments are given after the name of the program in command-line shell of Operating Systems.
To pass command line arguments, we typically define main() with two arguments : first argument is the number of command line arguments and second is list of command-line arguments.
Importance of loops in any programming language is immense, they allow us to reduce the number of lines in a code, making our code more readable and efficient.
● Introduction to Control Structures
Branching structures
● If statement, If-else statement, Nested if-else, else-if Ladder
● Switch statement
Looping Structures
● For loop, While loop, Do while loop
● break and continue
C Programming - Decision making, LoopingMURALIDHAR R
Execution of a statement or set of statement repeatedly is called as looping.
The loop may be executed a specified number of times and this depends on the satisfaction of a test condition.
A program loop is made up of two parts one part is known as body of the loop and the other is known as control condition.
Depending on the control condition statement the statements within the loop may be executed repeatedly.
Depending on the position of the control statement in the loop, a control structure may be classified either as an entry controlled loop or as an exit controlled loop.
Entry Controlled Loop:
When the control statement is placed before the body of the loop then such loops are called as entry controlled loops.
If the test condition in the control statement is true then only the body of the loop is executed.
If the test condition in the control statement is not true then the body of the loop will not be executed. If the test condition fails in the first checking itself the body of the loop will never be executed.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2. WHAT IS CONTROL FLOW STATEMENTS
• A control flow statements is a primary concept in most high-
level programming languages. It is a block of code. More
specifically, control flow statements are blocks of code that
control the flow of a program. In other words, a control
structure is a container for a series of function calls,
instructions and statements.
2
3. TYPES OF CONTROL FLOW STATEMENTS
• There are three types of control flow statements:
• Branching / Decision Making Statements
• Iterative / Looping Statements
• Jumping Statements
3
4. CONTROL FLOW STATEMENTS
• Branching / Decision
Making Statements
• If Statements
• Simple If
• If else
• Nested if
• Else if ladder
• Switch Case Statement
• Conditional Operator
• Looping / Iterative
Statements
• Entry Control Loops
• While Loop
• For Loop
• Exit Control Loop
• Do While Loop
• Jumping Statements
• Break Statement
• Continue Statement
• Goto Statement
4
5. BRANCHING STATEMENTS
• C program executes program sequentially. Sometimes, a
program requires checking of certain conditions in program
execution. C provides various key condition statements to
check condition and execute statements according conditional
criteria. These statements are called as 'Decision Making
Statements' or 'Conditional Statements.'
5
6. TYPES OF CONDITIONAL STATEMENTS
• If Statement
• Simple If
• If Else Statement
• Nested If Statement
• Else If Ladder
• Switch Case Statements
• Conditional Operator
6
7. IF STATEMENTS – SIMPLE IF STATEMENT
• Takes an expression in parenthesis and a statement or block of
statements. If the expression is true then the statement or
block of statements gets executed otherwise these statements
are skipped.
• Syntax:
if(Condition)
{
Statements;
}
7
8. SIMPLE IF EXAMPLE
void main()
{
int a=5;
if(a%2==0)
{
printf(“number %d is even.”,a);
}
}
8
9. IF STATEMENT – IF ELSE STATEMENTS
• This is also one of the most useful conditional statement used
in C to check conditions.
• Syntax:
if(condition){
true statements;
}
else{
false statements;
}
9
11. IF STATEMENT – NESTED IF STATEMENTS
• If within a If condition is called Nested If condition. It is a
conditional statement which is used when we want to check
more than 1 conditions at a time in a same program.
• Syntax:
11
13. EXAMPLE
void main()
{
int a,b,c;
a=5, b=6, c=8;
if(a>b){
if(a>c){
printf(“a is big”);
}
else{
printf(“c is big”);
}
}
else{
if(b>c){
printf(“b is big”);
}
else{
printf(“c is big”);
}
getch();
} 13
14. IF STATEMENT – ELSE IF LADDER
• Else if() ladder is similar to if else control statement. Else if()
ladder is used to check for another condition if the previously
specified condition becomes false.
• Syntax:
14
15. IF STATEMENT – ELSE IF LADDER - SYNTAX
If(condition){
Statement;
}
Else if(condition){
Statement;
}
Else{
Statement;
}
15
16. EXAMPLE
void main()
{
int a,b,c;
a=5, b=6, c=7;
if(a>b && a>c){
printf(“a is big”);
}
else if(b>c){
printf(“b is big”);
}
else{
printf(“c is big”);
}
getch();
}
16
17. SWITCH CASE STATEMENTS
• This is a multiple or multiway branching decision making
statement. When we use nested if-else statement to check
more than 1 condition then the complexity of a program
increases in case of a lot of conditions. Thus, the program is
difficult to read and maintain. So to overcome this problem, C
provides 'switch case'. Switch case checks the value of a
expression against a case values, if condition matches the case
values then the control is transferred to that point.
• Syntax
17
18. SWITCH CASE STATEMENT - SYNTAX
switch(expression){
case exp1:
statement;
break;
case exp2:
statement;
break;
default;
statement;
} 18
19. EXAMPLE
void main()
{
char c=‘a’;
switch(c)
{
case ‘a’:
case ‘e’:
case ‘i’:
case ‘o’:
case ‘u’:
printf(“character %c is
vowel”,c);
break;
default:
printf(“character %c is
constant”,c);
}
getch();
}
19
20. CONDITIONAL OPERATOR
• The ? : Operator is just like an if … else statement except that
because it is an operator you can use it within expressions. ?
: is a ternary operator in that it takes three values, this is the
only ternary operator C has.
• Syntax:
Condition-test? First-expression(true): second-
expression(false);
20
22. ITERATIONS / LOOPING STATEMENTS
• 'A loop' is a part of code of a program which is executed
repeatedly. A loop is used using condition. The repetition is
done until condition becomes true.
• There are two types of looping statements.
• Entry controlled loop
• While Loop
• For Loop
• Exit controlled loop
• Do While Loop 22
23. ENTRY CONTROL LOOP – WHILE LOOP
• This is an entry controlled looping statement. It is used to
repeat a block of statements until condition becomes true.
• Syntax:
while (condition){
Statements;
Increment/decrement;
}
23
25. ENTRY CONTROL LOOP – FOR LOOP
• This is an entry controlled looping statement. In this loop
structure, more than one variable can be initialized. One of the
most important feature of this loop is that the three actions can
be taken at a time like variable initialization, condition checking
and increment/decrement.
• Syntax:
for(initialization; test-condition; increment/decrement)
{
Statements;
}
25
27. EXIT CONTROL – DO WHILE LOOP
• This is an exit controlled looping statement. Sometimes, there
is need to execute a block of statements first then to check
condition. At that time such type of a loop is used. In this,
block of statements are executed first and then condition is
checked.
• Syntax:
do {
Statements ;( increment/decrement);
} while (condition);
27
30. BREAK STATEMENT
• It is necessary to exit immediately from a loop as soon as the
condition is satisfied. When break statement is used inside a
loop, then it can cause to terminate from a loop. The
statements after break statement are skipped.
• Syntax:
if(condition)
{
break;
}
30
32. CONTINUE STATEMENT
• It is required to skip a part of a body of loop under specific
conditions. The working structure of 'continue' is similar as that
of that break statement but difference is that it cannot
terminate the loop. It causes the loop to be continued with next
iteration after skipping statements in between. Continue
statement simply skips statements and continues next
iteration.
• Syntax:
if(condition){
continue;
32
34. GOTO STATEMENT
• The goto statement is a jump statement which jumps from one point
to another point within a function or program. The goto statement is
marked by label statement. Label statement can be used anywhere in
the function above or below the goto statement. Simple break
statement cannot work here properly. In this situation, goto
statement is used.
• Syntax:
if(condition){
goto err;
}
err:
statements;
34