Introduction
C Programming
C Advanced
Important C Programs
Modal Box
Tutorials
C is a very powerful and widely used language. It is used in many scientific programming situations. It forms (or is the basis for) the core of the modern languages Java and C++. It allows you access to the bare bones of your computer.C++ is used for operating systems, games, embedded software, autonomous cars and medical technology, as well as many other applications. Don't forget to visit this section...
Do while loop
In do while loop, body of the loop is executed first and after that, the condition is checked.
Do while loop executes at least once even if the condition is not true a single time.
Syntax for do while
do
{
// body statement to be executed
}
while (condition here);
Example
#include <stdio.h> #include <conio.h> int main() { int i=1; do { printf("This will execute once even the condition is false"); } while(i<0); }
⇒ In the above case, the condition is false from the beginning but loop still executes once.
Video/ C Introduction
Watch video in full size