Looping In C In Hindi/ While, Do While For Loop हिंदी में|While, Do While For Loop In Hindi?

हेलो Friends, इस ब्लॉग पोस्ट(While, Do While For Loop In Hindi) में मैं आपको Looping के बारे में बताने वाला हूँ | जैसे कि while, do-while, for, nested for loop | इन loops का program में बड़ा ही important role होता है |

यह एक ऐसी प्रक्रिया है जिसमे define कि गयी condition के true रहने तक ब्लॉक में लिखे statement लगातार run होते है, जब तक कि define कि गयी कंडीशन false नहीं होती |While, Do While For Loop In Hindi|

While Do While For Loop In Hindi:

while Loop :

यह एक looping statement है इसमें define की गयी condition के सही रहने तक command के statement लगातार run होते है|

एक program बनाइये जिसमे 1 तो 100 तक की गिनती display हो |

#include<stdio.h>
#include<conio.h>
main()
{
int n = 1;
While(n<=100)
{
printf(“%d”,n);
n++;
}
getch();
}

Do while Loop:

इसे पोस्ट test loop भी कहा जाता है, इसमें पहले command के set execute होते है , तथा बाद में condition execute होती है | अतः command के set रन होने के पश्चात एक बार condition और चेक होती है, जबकि while statement pretest loop होता है|

Syntax:
Do
{
statement;
}
While(condition);

Program:

#include<stdio.h>
#include<conio.h>
main()
do
{
int i = 1;
While(i<=10);
{
printf(“%d\t”, i);
i++;
getch();
}}

For Loop :

यह सबसे powerful loop होता है | यह एक निश्चित समय में program के section code execute करता है | इसका प्रयोग मुख्य रूप से तब करते है जब हमें यह मालूम हो कि एक निश्चित समय के अंतरगर्त हमें command के sets कितनी बार execute करना है |

Syntax:

for(initialization; test expression; increment value);

इनमे तीन मुख्य expression define किये जाते है, सबसे पहले varibale को value प्रदान कि जाती है, फिर condition define कि जाती है| तथा अंत में variable की वैल्यू में increment या decrement करते है |

Program:

#include<stdio.h>
#include<conio.h>
main()
{
int n;
for(n=1; n<=20; n++)
{
printf(“%d”,n);
}
getch;
}

Nested For Loop :

जब किसी for loop को एक दूसरी loop के अंतर्गत inclosed किया जाता है, तो इसे nested for loop कहते है | इसमें first लूप द्वारा execute किये गए command inner loop के द्वारा पुनः execute किये जाते है|

program:

#include<stdio.h>
#include<conio.h>
main()
{
int x, y, sum;
for(x=1; x<=5; x++)
{
for(y=1; y<=3; y++)
{
sum = x+y;
printf(“x = %d, y=%d, sum=%d\n”, x,y,sum);
}}
getch();
}

You can also go through a few more amazing blog links related to C/C++:

Problems of procedure-oriented language in Hindi…
This Pointer In C++ In Hindi…
how to learn c language easily…
C Language Interview Question In Hindi…
Looping In C In Hindi…
Switch Statement In C In Hindi…
IF Statement In C In Hindi…
IF-Else Statement In C In Hindi…
Nested If-Else Statement In C In Hindi…
Top to bottom vs Bottom-up programming approach in Hindi…

इस ब्लॉग(While, Do While For Loop In Hindi) को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते a5theorys@gmail.com पर ईमेल लिख सकते है|

आशा करता हूँ, कि आपने इस पोस्ट ‘Looping In C In Hindi: While, Do While, For, Nested For’ को खूब एन्जॉय किया होगा|

आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|While, Do While For Loop In Hindi|

आपका समय शुभ हो|

Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.