Skip to main content

Control flow overview

Control flow tell us the order in which instructions need to be executed.  Basically, control statements are of three types.
1. Conditional control statements
2. Loop control structure
3. Direct control flow.

Conditional control statements:
Below are various conditional control statments availabe in c language.
1. if statement
2. if-else statment
3. else-if statement
4. nested if statments
5. switch statment

Loop control structure:
Below are various loop control structures available in c language.
1. for
2. while
3. do-while

Direct control flow:
Below are various direct control flow statements available in c language
1. break
2. continue
3. goto
4. return
5. null statement

We will see more about the above topics in detail in the forthcoming tutorials.

Comments

Popular posts from this blog

restorecrtmode example in c

Header file:     graphics.h Synopsis:        void restorecrtmode();       Description:       restorecrtmode() restores screen mode to text mode. restorecrtmode function in c graphics   #include <graphics.h>   #include <stdlib.h>   #include <stdio.h>   #include <conio.h>   int main(void) {         /* request auto detection */         int gd = DETECT, gmode, err;         int midx, midy;         /* initialize graphics and local variables */         initgraph(&gd, &gmode, "C:/TURBOC3/BGI");         /* read result of initialization */         err = graphresult();         if (err != grOk) {                 /* an error occurred */               ...