Skip to main content

Difference Between While Loop & Do While Loop

 

 While Loop

 Do While Loop

 Test condition first before execution.

 Test condition after execution.

It does not execute if condition false first. 

It execute once if condition false. 

 While loop dose not terminate by semicolon.

Do While loop is terminate by semicolon.

 Syntax :
    Initialization
 While (Test condition)
    {statement;
        increment/decrement;
                }    
 Syntax:
        Initialization
      Do{statement;
            increment/decrement;
                }
       While (Test condition);
                }

Comments

Popular posts from this blog

Important questions of C programming (BCA)

 . What is the characteristics of a good program? Explain types of language processor. Explain any two system design tools. Explain Program Development Life Cycle. Define programing techniques. Different between top-down and button - up approach with suitable example. Difference between cohesion and coupling. Define identifiers, constants, variables and keywords. Explain datatypes. Explain different types of  datatypes available in C. Define operator. Explain its types with suitable example. Explain decision making statement. Explain its type with example. Difference between while, do while loop, for loop. Write a program to find the fibonacci  sequence. What is jumping statement. Explain its types with suitable example.    Write a program to display following:               *               **               ***         ...

BCA Math II old question model solution

 . BCA Math II question model 2018: BCA Math II question model 2019: BCA Math II question model 2020:

BCA mathematics -I (Unit I Set)

 .