While and Do-While in c :- While Loop ek single loop hoti hai. jab condition True hoti hai tab hi Statement execute hote hai.
Learn – HTML Tutorial In Hindi Or CSS Tutorial In Hindi
Do While Me Pahle Program Execute Hota hai or bad me condition check Hoti Hai | Lekin Do while statement ek bar Jarur execute hoti hai.
While and Do-While in c in Hindi
Contents
Isme Ham While Loop In C In Hindi Or Do While Loop in C In Hindi Yani Ki Dono Ke Alag Alag Program Banane Ke Dono Me Difference Dekhte Hai, To Chahilye Sabse Pahle While Loop In Hindi Ko Dekhte Hai |
While Loop In C In Hindi
Syntax While Loop :-
initial variable declaration; while(condition) { //statements //increment }
Example :-
#include<stdio.h> #include<conio.h> int main() { int number=1; while(number<=10) //while loop with condition { printf("%d\n",number); number++; // incrementing operation } return 0; }
Output :-
1 2 3 4 5 6 7 8 9 10
Aap Dekh Sakte Hai While Loop ko aap kese istemal kar sakte hai.
Also Read – For While And Do-While in Hindi
Do-While in c in Hindi
Syntax Do-While Loop
do { statements } while (expression);
Example :-
#include<stdio.h> #include<conio.h> int main() { int num=1; //initializing the variable clrscr(); do //do-while loop { printf("%d\n",num); num++; //incrementing operation }while(num<=10); getch(); return 0; }
Output :-
1 2 3 4 5 6 7 8 9 10
Dosto mujhe ummed hai ki aap difference between while and do while 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 |