If you want to execute a block of code more than one time then you can use loop. Loops are used in c programming to repeat a specific block of code.
"do-while" loop executes first do(){} body statements then check condition. Therefore its body statements are executed at least one time. It means "do-while" loop gives output at least one time.
If in initial iteration condition return false value then it return at least one time output otherwise it works same as "while()" loop.
Initialization, iteration and condition is doing same work like while() loop.
Syntax
initialization;
do{
/* code here */
iteration;
}
while( condition );
Comsysapp.com is an educational website. Students and software developers can learn programming language tutorials. Comsysapp is very useful for beginners and professional developers. Comsysapp provides tutorial in easy language. Comsysapp.com has focus on simplicity.
Comsysapp.com provides free tutorials like c, html, css, etc. All tutorials are free for beginner and professionals.
comsysapp.com is not responsible for any mistake. We are not responsible if information made available on our website is incomplete or invalid. But comsysapp.com always try for zero-zero mistake.
comsysapp.com does not collect any data from users. We use Google AdSense advertising on our website. We never ask personal or private information.
copyright © 2023