It is very similar to the while loop shown
above. The only difference being, in a
'while' loop, the condition is checked
beforehand, but in a 'do while' loop, the
condition is checked after one execution of
the loop as we explained you in our C basic
tutorial.
lets write the above program using do while
loop.
#include <iostream.h>
int main()
{
int i=0;
do
{
i++;
cout<<"freecprograms"<<endl;
}