Loop Control Statements − break and continue

preview_player
Показать описание
C Programming & Data Structures: break and continue statements in C programming.
Topics discussed:
1) Break statement.
2) Programming example of break statement.
3) Continue statement.
4) Programming example of continue statement.

Music:
Axol x Alex Skrindo - You [NCS Release]

#CProgrammingByNeso #CProgramming #breakStatement #continueStatement
Рекомендации по теме
Комментарии
Автор

What a lecture sir.
we cannot imagine these kind of lectures in Colleges

hritikvasuja
Автор

this channel deserves much more subscribes....you guys are doing really great job ..thanks alot !

pradipmalla
Автор

The best C Programming guide and explanations I have ever seen for beginners like me. Clear, concise explanations that we can immediately use in our own C programs. To everyone studying for exams, good luck and you'll do awesome!!!

brockolious
Автор

This seemed much easier for me for continue
#include<stdio.h>
int main(){
int a;
for(a=1;a<=20;a++)
{
if(a%2==0)
continue;
else
{
printf("%d", a);
}
}
return 0;
}
Thank you for all the lectures😘

ItachiUchiha-mmov
Автор

I think that the second example is to complicated,
i suggest this code:

int main() {
for (int i = 0; i < 20; i++) {
if (i % 2 == 0) {
continue;
}
printf("%d\n", i);
}
}

noaMurcianOfficial
Автор

Alternate solution using previous knowledge of while loop thank you neso academy 🙏❤
#include<stdio.h>
int main()
{
int i;
printf("enter an integer");
scanf("%d", &i);
while((i!=0)&&(i>0))
{
printf("enter an integer");
scanf("%d", &i);
}
}

rajeevKr
Автор

Sir you are taking the profession of teaching to next level such a well narrated lecture at free of cost! Thanks a lot sir

nitishsah
Автор

Fantastic lecture! Concise and the differences between break and continue super clear!

Maha_s
Автор

4:55 "It simply means we won't execute the rest of the statements but we would *continue* to execute the loop"

tayyab.sheikh
Автор

Realizing in 2020, WAP.. is something else now 🤣🤣

dsa
Автор

I have been always in doubt with this topic.. Thank you so much for this lecture

sakshisrivastava
Автор

Damnnnn this video cleared all my Its so simply explained, I'm impressed !

sidzmhs
Автор

so for 0:38 i quite didn't understand the necessity of using break in this exercise since i can use only while loop without if and break, it will work exactly same like this(please correct me if im wrong):

#include <stdio.h>

int main()
{
int n;
printf("enter a number;)");
scanf("%d", &n);

while(n!=0&&n>0)
{

printf("enter a number ");
scanf("%d", &n);
}
return 0;
}

ergoproxy
Автор

I before watching this video I was confused with this topic but now I understand how easy it was

yadhuss
Автор

#include <stdio.h>

int main()
{
int a, b;
printf("Enter value: ");
scanf("%d", &a);

for (b = 1; b <= a; b++)
{
if (b % 2 == 0)
{
continue;
}
printf("%d\n", b);
}

You can find out odd numbers for specific range within the min & max of integer type

ziko
Автор

Same program without continue
int main() {
printf("printing the odd number from 0 to 20\n");
int i=0;
while(i<20)
{
if(i%2 ==! 0)
{
printf(" this number is odd %d \n", i);

}
i++;
}
return 0;
}

ritikshrivastava
Автор

This guy tells lessons better than my university teachers!

tofiq
Автор

before i really confused.. but i watch this video i understand too much . thank so lot sir😙❤😍😊

kunalsoni
Автор

Thanks - I wrote down your definition for 'Continue'.

Codenames
Автор

#include<stdio.h>
int main()
{
int n=2;
for(int i=1;i<=20;i++)
{
if(i%n==0)
{

printf("%d\t", i);
}

}
}
// program for even number from 1 to 20.

moeentrimzi.