Conditions in C++ Hindi – Break and Continue Statement in C++ in Hindi

Break and Continue Statement in C++ in Hindi :- Break Condition in C++ in Hindi program ko break karne ke liye istemal karte hai | Continue Condition in C++ in Hindi ko ham program ko continue karne kar liye Istemal karte hai |

Read Also :- While Loops And Do-While Loops

Break and Continue Statement in C++ in Hindi

Break Condition in C++ :- Break Statement Ko Hamne Is Post me Acchi tarah se Samanjha ya gya hai with Example Ke Sath |

Flow Diagram :

break and continue statement | difference between break and continue

Break Condition program ko break karne ke liye istemal karte hai

Syntax :

break;

Example :-

#include <iostream>
using namespace std;
 
int main () {

   /* local variable definition */   int a = 1;

   /* while loop execution */   while( a <= 10 ) 
       {
   
      cout<<"value of a: "<<a<<endl;
      a++;
  
      if( a == 5)
      {
         /* terminate the loop using break statement */         break;
      }
   }
 
   return 0;
}

Output :

value of a: 1
value of a: 2
value of a: 3
value of a: 4
value of a: 5

Aap upper diye gye output me dekh sakte hai output keval 5 tak print hua jo ki aapne program ko 10 tak print karane ke liye kaha lekin wo break condition ki wajah se break ho gya.

Continue Statement in C++ Hindi

Continue Condition in C++ ko ham program ko continue karne kar liye Istemal karte hai | Continue Statement Ko Hamne Is Post me Acchi tarah se Samanjha ya gya hai with example :

Flow Diagram

break and continue statement

Syntax :

continue;

Example :-

 #include <iostream> 
 using namespace std;

int main() { 
 // loop initialization expression 
 int i = 1; 

 // infinite while loop 
 while (i<=10)
      { 
  if (i == 5) 
   continue; 

  cout<<i<<endl;
  i++; 
 } 

 return 0; 
} 

Output :-

1
2
3
4
6
7
8
9
10

Aap Upper diye gye output ko dekh sakte hai ki output me 5 print nhi hua hai kyoki 5 ko continue Yani Skip kar diya gya |

Conditions in C++ in Hindi

Read Also This Post:

Dosto mujhe ummed hai ki aap break and continue statement in Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Danish Ali

I Am a Cyber Security Student & I have Skills C, C++, Python, HTML, CSS, PHP, SEO, Computer & Advance Hacking & Blogger & YouTuber.

Published by
Danish Ali

This Website Uses Cookies in order to offer you the most relevant information.Please accept cookies for optimal performance

Read More