Loops In C

what is loops in c in hindiDear Students, aaj ke is Lecture me hum loops in c  ke bare main padege. Yani ke c language mian loops kya hote hai. C language mian loops kaise kaam karte hai. Types of loops in c aadi se related ye sare topic ham is lecture main cover karege.

Lectures Covering Topic

  • Introduction To Loops In C In Hindi
  • Why Use Loops In C Language In Hindi
  • Advantages Of Loops In C Language In Hindi
  • How To Makes Loops In C Language
  • Types Of Loops In C In Hindi
  • Syntax Of Loops In C Language In Hindi
  • Examples Of Loops In C Language In Hindi

Introduction To Loops In C In Hindi

C language main kisi block ya program ke kisi code ke eak part ko kai bar execute karna hota hai. Tab ham loops ka use karte hai. Yani ke loops codes ko eak se jayada bar repeat karne ke liye kiya jata hai.

To loops aapke code ki eak ya eak se jayda lines ko repeat karne ke liye allow karta hai. Bahut sare programs main sare programs main ese kaam hote hai jinhe repeat kiya jana chahiye.

Isliye kisi bhi programming lanugae ke liye loop structure bahut important part hai. To chaliye seekhte hai loops in c ke bare main ye kaise kaam karta hai.

Why Use Loops In C Language In Hindi

Why use loops in C yani ki hum c language main loops ka use kyon karte hai. Ab aap maan lo ki me aapse kahun ki “hindimetutorial.com” statements ko aapko 15 times print karna hai. To aisa aap kis tarah se karnege?

Generally aisa karne ke liye aap 15 times printf() statements ko likhenge. Ya fir main aapse 2, 3 ka tables pringt karne ke liye kahun. To aap iske liye bhi 10-10 times printf() statements likhenge.

Yah eak wrong process hai aisa karne se programmer ka time or computer ki memory dono he waste hoti hai. Is tarah ke kaam ko karne ke liye hum loops ka use karte hai. Loop main hum yah kaam 4 and 5 lines main complete kar sakte hai.

Advantages Of Loops In C Language In Hindi

  • Loops ke help se hum apne time ko bacha(save) kar sakte hai.
  • Iski helps se hum Array ke elements ke sath traversing kar sakte hai.
  • Loops ke help se hum apne bade code ko thoda kam kar sakte hai.

How To Makes Loops In C Language

Jaisa ki aapko mene bataya hai ki loops ka use one more then lines ke code ko print karane ke liye kiya jata hai. To ab aapko ye bhi pata hona chahiye ki loops ko banate kaise hai. Loops 3 parts se milkar bana hota hai.

HOW TO MAKE LOOPS IN C

  • Initial Variable:- Yah wah variable hota hai jhan se hum loop ko start karte hai. Yah eak integer variable hota hai. Is variable ko jab tak increments/decrements kiya jata hai jab tak ki di hui condition false nahi ho jati. Isi variable ko loops main di huyi condition main include kiya jata hai.
  • Condition:- Yah wo condition hoti hai jo loop ko control karti hai. Jab tak yah condition true hoti hai tab tak loop execute hota rahta hai. Jaise he ye condition false hoti hai loop automatic terminate ho jata hai.
  • Increment/Decrement:- Yhan se hum apne loop ko kitne number se ya fir kaise loop ko chalana hai. Apne initial variable ko increment ya decrement karte hai. Yah sab increment part main define kiya jata hai.

Types Of Loops In C In Hindi

C language me hamare paas 3 types ke loops hote hai.

  • For loops
  • While loops
  • Do-while loops

types of loops in c in hindi

For Lops In C In Hindi

C loops mian for loop ka use sabs jyada kiya jata hai. Yah loop sabse essy hota hai. For loop eak single statements main define hota hai. Aap iska syntax neeche dekh skate hai. For loop ki yah eak khas bat hai ki iske 3 elements eak he statement me likhe jate hai.

Syntax

While Loops In C Hindi

While loop bahut he simple loop hota hai. Ye Tab tak execute hota hai jabtak iske condition ture rahti hai. Condition ke false hone par ye loop terminate ho jata hai. While loop ka syntax aap neeche dekh sakte hai.

Syntax

Condition agar pahle bar he false hoti hai. To compiler loop main enter nahi hota hai. Loop ke andar ke sare statements ko skip kar diya jata hai.

Do-While Loop In C In Hindi

Do-While loop bhi while loop ke tarah he hota hai. Lekin is loop main condition check hone se pahle statement execute hota hai. Eak bar execute hone ke bad condition check hoti hai. But aisa sirf first time hota hai.

Syntax

Jaise ki compiler do section me ata hai. To do block ke sabhi elements ko execute kar diya jata hai. Or initial variable ko increment/decrement kar diya jata hai. Iske bad compiler while condition ke check karta hai. Yadi condition true hoti hai to do block ko execute kiya jata hai. Or agar condition false hoti hai to loop ko terminate kiya jata hai.

Note:- Is lecture main hum sirf loops ke type or syntax ke bare main seekh rahe hai. In loops ko details main hum next lectures main padege.

Examples Of Loops In C Language In Hindi

Output

loops in c language in hindi

Related Lecture

Dear Students, main aasha karta hun ki aapko loops in C Ka Lecture padh kar samjh me aa gaya hoga. Ki C language main loop statements ka use kaise karte hai. Yadi aapako (loops in C) ke lecture se related koi bhi problem hai to aap hume comment karke puch skte hai.

Share This Post On

About Author

Thakur Aman Singh

Hey, I am Aman Singh Tomar from Taj City Agra. Through This Blog I want to share my Knowledge with all of you. Read More >>

Leave a Reply

Your email address will not be published. Required fields are marked *