continue Inside while & do while in C - C Programming Tutorial 59

preview_player
Показать описание
Notes for You:: continue Inside while & do while in C.
- Computer skips statement(s) under the continue statement, and transfers the control to the condition part of the loop in the context of while and do while loops whereas in the context of for loop, control is transferred to increment / decrement part.

Example Code:
- Displaying 1,2,3,4,5 using while loop.
int i =1;

while(i<6)
{
printf("%d\n", i);
i++;
}

Example Code:
- continue inside while loop in C.
- Displaying 1,2,4,5 using while loop.
int i =0;
while(i<5)
{
i++;
if(i==3)
{
continue;
}
printf("%d\n", i);
}

Example Code:
- continue inside do while loop in C.
- Displaying 1,2,4,5 using do while loop
int i =0;
do
{
i++;
if(i==3)
{
continue;
}
printf("%d\n", i);

}while(i<5);

Note:
- replace < with less-than symbol.

=========================================

Follow the link for next video:
C Programming Tutorial 60 - goto Statement in C Programming Language

Follow the link for previous video:
C Programming Tutorial 58 - continue Statement in C Programming Language

=========================================

C Programming Tutorials Playlist:

=========================================
Watch My Other Useful Tutorials:-

Computer Programming Fundamentals Playlist:-

C Practical LAB Exercises Playlist:-

C++ Tutorials Playlist:

=========================================

► Subscribe to our YouTube channel:

► Visit our Website:

=========================================
Hash Tags:-
#ChidresTechTutorials #CProgramming #CProgrammingTutorial
Рекомендации по теме
Комментарии
Автор

SUBSCRIBE, SHARE & SUPPORT:
VISIT & LEARN AT FREE OF COST:

ChidresTechTutorials
Автор

Very helpful no one has solved this question

shivamsinha
Автор

An other better one thank you Manjunath

kadriahamadamouroivili
Автор

This is an amazing secret I just got the Ahaaa moment no tutorial has even been able to explain what happens to the continue statement inside of the while loop up until now, I subscribe to this channel for that reason.. with love from Nigeria

samsonubong
Автор

This tutorial is also very helpful in 2022 .
thank you children's_tech_tutorial 👍🏻

vwolf
Автор

Tnx so much for this amazing explanation. No one talks about 'continue' behavior in the while & do while loop context.

snakemanluffy
Автор

Sir where your tutorial on Break statement inside while loop

JanLouieRubin