C_39 Do while loop in C with program | C Programming Tutorials

Поділитися
Вставка
  • Опубліковано 21 січ 2021
  • In this lecture we will learn:
    - What is do while loop in C?
    - Syntax of do while loop
    - working of do while loop
    - Flowchart of do while loop
    - difference between while and do while loop
    C Programming Playlist: • Programming in C
    *********************************************************
    Connect & Contact Me:
    Jenny's Lecture Hindi: / @jennyslectureshindi
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/profile/Jayanti...
    Instagram: / jayantikhatrilamba
    Twitter: / khatrijenny
    *************************************************************
    More Playlists:
    C++ Tutorials for beginners: • Lec 1: How to Install ...
    Best Python Tutorials for Beginners: • Python - Basic to Advance
    Printing Pattern in C: • Printing Pattern Progr...
    Placement Series: • Placements Series
    Data Structures and Algorithms: https: • Data Structures and Al...
    Design and Analysis of Algorithms(DAA): • Design and Analysis of...
    Dynamic Programming: • Dynamic Programming
    Operating Systems tutorials: // • Operating Systems
    DBMS Tutorials: • DBMS (Database Managem...
    #forloop #loop #cprogramming #coding #jennyslectures #whileloop
    #dowhileloopinC

КОМЕНТАРІ • 257

  • @relax4523
    @relax4523 Рік тому +126

    9:44 it would be a finite loop
    Firstly i =0 the it enters the loop
    Jenny would be printed then the value of i would be incremented(i=1) and condition is checked.since condition (i>0) is true the body of the loop is executed again.so Jenny would be printed again until the i value reach 32767.the value is incremented again the i would be equal to -32768(since range of signed integer is from -32768 to 32767).so condition will be false(-32768 is less than 0) and it exists the loop.then prints out of loop

  • @jonasasare5775
    @jonasasare5775 3 роки тому +83

    I just don't know how this amazing course in programming is free. You always explain to a layman understanding, Thank you for always bringing us awesome lectures

  • @geethasree-pt2fi
    @geethasree-pt2fi 6 місяців тому +4

    Successfully completed 39 lectures in 1 day

  • @ratiranjanjadav2929
    @ratiranjanjadav2929 3 роки тому +15

    You are doing great job mam...may God bless u with good health .

  • @shraddhapawar5674
    @shraddhapawar5674 3 роки тому +53

    It's not a infinite loop,
    It will print the Jenny upto 32767, and when i becomes negative ie is -32768 then the loop end.

    • @prajwal7257
      @prajwal7257 3 роки тому +3

      🙏

    • @Abii_r
      @Abii_r 2 роки тому +4

      Loop ends and it also prints out of loop

    • @Udtashaitaan
      @Udtashaitaan 2 роки тому +7

      Output:1 jenny
      2 Out of the loop
      Becouse here we use postincrement so first we check the condition on 0 and the condition is false and we out of the loop

    • @tattikumar8727
      @tattikumar8727 2 роки тому +4

      @@Udtashaitaan no 1st of all it will do increment and then it will check condition which would never come false so it will definitely be an infinite loop

    • @relax4523
      @relax4523 Рік тому +1

      @@tattikumar8727 condition will be false when I becomes -32768

  • @y1_ff
    @y1_ff 10 місяців тому +7

    9:44, a finite loop is initiated. Initially, `i` is set to 0, and the loop begins execution.
    In the first iteration, "Jenny" is printed, and then `i` is incremented (i = 1). The condition is checked, and since the condition `(i > 0)` is true, the loop body is executed again. This continues, printing "Jenny" repeatedly until the value of `i` reaches 32,767.
    Upon incrementing further, `i` becomes -32,768 (as the range of signed integers is from -32,768 to 32,767). At this point, the condition becomes false (`-32,768` is less than `0`), and the loop exits. Finally, "Out of loop" is printed.

  • @krishnakarpe409
    @krishnakarpe409 3 роки тому +3

    Nice explanation ma'ma .your teaching methods are just superb.

  • @chiradeepbhattacharya4858
    @chiradeepbhattacharya4858 3 роки тому +6

    Thanks for your constant support maam, you are the reason why I started to love programming from being afraid of.

  • @Baby.Yoda.knows.tech.
    @Baby.Yoda.knows.tech. 3 роки тому +9

    Mam my whole college studies from you..
    And today when i was returning back to home by bus...
    Some students from other colleges were talking about u..

  • @vengalasindhuja9484
    @vengalasindhuja9484 11 місяців тому +1

    In love with this teaching mam❤ Thankyou for your efforts in teaching us flawlessly 💯

  • @DineshKumar-uu5pr
    @DineshKumar-uu5pr 3 роки тому +2

    Such a great lecture mam love you lot mam♥️😘I understand depth in c programming

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 3 роки тому +5

    What a pin point accuracy teaching mam ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

  • @chiradeepbhattacharya4858
    @chiradeepbhattacharya4858 3 роки тому +6

    Maam its my humble request on the behest of fellow aspirants like us,please upload video with regard to JAVA & PYTHON & other nitty gritty of CSE.Please do help us with your incredible knowledge.

  • @neverstoplearning3451
    @neverstoplearning3451 Рік тому

    Thank you so so much ma'am for cleaning concept of do while loop

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 3 роки тому +2

    Really Great GOD BLESS YOU Mam

  • @harshvardhantandon8278
    @harshvardhantandon8278 2 роки тому +13

    9:30 this will be a finite loop till the range of integer hence in a 16-bit compiler jenny would be printed 65536 times till the value returns to be zero.

    • @asthachauhan4470
      @asthachauhan4470 2 роки тому

      Can u pls explain, how?

    • @harshgoyal3553
      @harshgoyal3553 2 роки тому +8

      @@asthachauhan4470 it will reach till 32767 and then it becomes -32768 and it will come out of loop

    • @jeelanibasha3984
      @jeelanibasha3984 Рік тому +2

      but first the value should have to assign it means the value of i is to be 0 first it will unsatisfy and gets out of the rule????

    • @YashPavaskar
      @YashPavaskar Рік тому

      @@jeelanibasha3984 {at initial stage i is zero as we proceed in do loop
      Jenny will be printed for the first
      And then increment will take place
      So it trend to implement i value to 1
      Then as we proceed to while loop
      As per condition
      (i>0)
      Since i is 1 and 1 is greater than zero
      So the condition is true
      And it will execute the statement inside do loop
      *Jenny* till infinity as i goes on incrementing and since condition is true every time
      }

    • @YashPavaskar
      @YashPavaskar Рік тому +1

      @@harshgoyal3553 technically is correct as the data type int range from -32768 to 32767 but it's count to be infinity

  • @pavanyegireddy6957
    @pavanyegireddy6957 Рік тому

    Mam very very thank you for your free lectures . It is amazing

  • @greyhat5204
    @greyhat5204 3 роки тому +6

    Mam according to code blocks's IDE it is an infinite loop if we put condition i>0

  • @DCEAsmaIqbal
    @DCEAsmaIqbal 2 роки тому +1

    Thankyou i am going to giving my viva with the help of your videos

  • @pushpaka.fasate6170
    @pushpaka.fasate6170 3 роки тому +1

    mam please make a video on time complexity. You are doing great job mam your video lecture are so helpful...................

  • @balanjaneyasharma4347
    @balanjaneyasharma4347 3 роки тому +1

    Excellent 👌 lecture

  • @rameshejjigani8950
    @rameshejjigani8950 Рік тому

    It will prints the jenny up to int value and after it goes mines and finally compared some interactions the zero will comes and loop will break

  • @suryatej2573
    @suryatej2573 2 роки тому +1

    Madam your lectures helped me a lot to prepare for off campus placements here I need ur suggestion for websites or jobportals for data analyst because I'm looking for data analyst profile I hope u would give few suggestions

  • @sulectures2773
    @sulectures2773 3 роки тому

    Nice ma'am... Tq so much

  • @gowthamselvaraj7793
    @gowthamselvaraj7793 Рік тому

    very good explaination now get the point that do while will execute once without checking the condition.....

  • @birsakumhar7240
    @birsakumhar7240 2 роки тому

    Thank you mam
    very helpful video

  • @sandeshv6721
    @sandeshv6721 3 роки тому +2

    Very helpful mam..

  • @dishantitaliya1912
    @dishantitaliya1912 Рік тому +2

    Such a very nice explanation in all lectures without taking any fees.thanks a lot god bless you.stay happy forever

  • @mysterious8198
    @mysterious8198 3 роки тому

    Nice explanation ma'am

  • @shayanali8771
    @shayanali8771 3 роки тому +1

    Could you please make a video on continue keyword in C

  • @achintyaroy1084
    @achintyaroy1084 2 роки тому

    thank you very much..

  • @civilgaming1098
    @civilgaming1098 2 роки тому

    Thank you so much

  • @tulakchowdhury4906
    @tulakchowdhury4906 3 роки тому +30

    assignment:
    Jenny would be printed infinite times

  • @Prasanna-im1zy
    @Prasanna-im1zy 11 місяців тому

    At 9:45
    If we use short int then range would be -32768 to 32767
    So it prints 32767 times

  • @abhimanyugangwar07
    @abhimanyugangwar07 2 роки тому +4

    It will be printed till the range of integer

  • @amanprakashnigam5933
    @amanprakashnigam5933 3 роки тому

    वाह मैडम जी वाह समझ में आ गया नमस्ते

  • @maheshkumar-tx7hz
    @maheshkumar-tx7hz 2 роки тому +1

    jenny mam without writting do if we write print statements then after while loop liketho(i think it may same as do while loop)

  • @malleshsanju5235
    @malleshsanju5235 3 роки тому +2

    Mam please explain of c++ Program concepts

  • @KeerthiGovindasu
    @KeerthiGovindasu 8 місяців тому

    thank you maam

  • @hariparuchuru3858
    @hariparuchuru3858 2 роки тому +21

    if we use i++ in the loop it will become infinite loop

  • @pradumnpatel5047
    @pradumnpatel5047 3 роки тому +1

    Thanks you 🙏🙏🙏mam

  • @AJAYKUMAR-ti2dl
    @AJAYKUMAR-ti2dl 3 роки тому

    Hello mam
    Please tell better book for data structure

  • @user-hj7ff1rr8n
    @user-hj7ff1rr8n 7 місяців тому

    Hi mam you are awesome superb thank you so much we learn a lot in this subject ❤

  • @Vj_siddhu_fangirl761
    @Vj_siddhu_fangirl761 3 роки тому +2

    Pls make video for algorithm mam..

  • @Akhilkanaboina
    @Akhilkanaboina 2 роки тому

    Definatly It is an infinte loop !

  • @fakharudin1289
    @fakharudin1289 3 роки тому +3

    respect from pakistan ma'am your are very decent and intelligent

  • @abhishekvanenooru4959
    @abhishekvanenooru4959 2 роки тому +1

    Tq akka

  • @473g.koteswaraiah3
    @473g.koteswaraiah3 3 роки тому

    Mam what is use of doing programming

  • @varunchaudhary6446
    @varunchaudhary6446 3 роки тому

    Superb mam

  • @mamoonkhan490
    @mamoonkhan490 3 роки тому

    mam when we write i++ in do loop then it will print infinite

  • @chohan2253
    @chohan2253 Рік тому

    but I am observing an infinite loop in vs code I don't understand what is the issue. Even in some similar tutorials before I was getting infinite loops

  • @premraj1456
    @premraj1456 3 роки тому

    Thanks mam

  • @poornimavasu8020
    @poornimavasu8020 2 роки тому +6

    Jenny will be printed infinite times.
    Thank you mam for this video

    • @surya..g
      @surya..g Рік тому

      No infinite it will print up -32767 condition become false

  • @dharmendrasharma9317
    @dharmendrasharma9317 2 роки тому

    Mam your teaching way is beautiful 🌺🌹 and you are also so much beautiful 🌺🌺🙏🙏

  • @rushikeshsanap1981
    @rushikeshsanap1981 Рік тому

    Thank you jayanti ma'am

  • @brindhavenugopal4395
    @brindhavenugopal4395 3 роки тому

    Mam. Please explain pattern programs in C

  • @AKASHAKASH-sp4yd
    @AKASHAKASH-sp4yd Рік тому

    mam i think we use i++ at loop ,we get a infinite ....pls reply it is correct are not?

  • @nirmalateju2436
    @nirmalateju2436 2 місяці тому

    I am running program easily thankyou mam

  • @pavankumarsingarigalla7165
    @pavankumarsingarigalla7165 3 роки тому +4

    Mam could yourself please make a videos on machine learning, Artificial Intelligence,data science, natural language processing please please please please please please please please please please please please

  • @rajeshkumar-uk2jo
    @rajeshkumar-uk2jo 2 роки тому

    Tq so much mam

  • @abhayamoharana9297
    @abhayamoharana9297 3 роки тому

    Mam plz tell me which language is best

  • @kasyapdharanikota8570
    @kasyapdharanikota8570 3 роки тому +1

    please upload a placement series

  • @mhamza8317
    @mhamza8317 Рік тому +1

    It will print upto the max positive value of computer..

  • @sourav9352
    @sourav9352 8 місяців тому

    Mam yha pe increment kaise ho rha hai ye samjh me nhi aaya last example wale mei ye infinite loop kaise ho rha hai??

  • @nagendrachariramadugu5342
    @nagendrachariramadugu5342 2 роки тому +2

    Since the value of i is incremented after the execution of the line,the condition becomes false ,since the the loop "do while",the body of the loop is executed before the condition gets executed.Hence, the printf statement inside the loop prints the text given by the programmer,for once.As soon as the task gets done,the controller will directly exits the loop, because the condition doesnot match the modified statement.

    • @vrengineers2462
      @vrengineers2462 Рік тому

      no, it prints "jenny " infinite times.

    • @crazywiper3908
      @crazywiper3908 Рік тому

      no it prints jenny 32767 times then stops because after this it becomes -32768 so as this number is less than 0 and condition is false it stops.
      so it prints jenny 32767 times and stops

  • @DeepakKumar-nk3cv
    @DeepakKumar-nk3cv 3 роки тому +4

    Mam parallely start c++ course.......🙏🙏🙏

  • @Ravi44446
    @Ravi44446 3 роки тому

    Mam can u plz give lectures on core Java I'm from Haryana

  • @741ibrahim2
    @741ibrahim2 3 роки тому

    mam its infinate loop because condition 1 >0

  • @slemankhan9533
    @slemankhan9533 2 роки тому

    looking very nice mam i cannot learn coding......

  • @bhosleakash______96k81
    @bhosleakash______96k81 3 роки тому

    Super ❤️❤️❤️❤️

  • @nagapilla1452
    @nagapilla1452 3 роки тому

    Nice...

  • @maryannemuthoni5388
    @maryannemuthoni5388 8 місяців тому

    At 9:39 it will go through range then when i becomes 0 it stops and prints out of loop

  • @sayansaha5326
    @sayansaha5326 2 роки тому

    Thanks didi

  • @challarekha3309
    @challarekha3309 Рік тому

    Mam what's the purpose of do

  • @daddygamingyt74
    @daddygamingyt74 3 роки тому

    Dear why don't you make tutorial on java ?..

  • @rishavvats9038
    @rishavvats9038 3 роки тому

    only one time i guess because the moment it will be one it will check the condition which is false and it will get out of loop

  • @adityabikramjena4584
    @adityabikramjena4584 2 роки тому +4

    Starts at 2:00

  • @siddhartharaj8451
    @siddhartharaj8451 3 роки тому

    at 9:48
    it will print infinite times jenney

  • @sudhirkundurthi5150
    @sudhirkundurthi5150 3 роки тому

    Mam start uploading c++ course also

  • @bilalprogrammer
    @bilalprogrammer 3 роки тому +4

    I from Pakiatan
    I am a programmer But Ma'am I have also like your lecture

  • @siddeshwaragencybasavaraj7605
    @siddeshwaragencybasavaraj7605 2 роки тому

    Yes ma'am ... Please reach us c++

  • @143nivvytechchannel6
    @143nivvytechchannel6 Рік тому

    nice video

  • @vamshibhumani4742
    @vamshibhumani4742 2 роки тому

    Super

  • @AbhishekKumar-qj2qh
    @AbhishekKumar-qj2qh Рік тому

    if we use i++ it will give infinie times jenny

  • @continnum_radhe-radhe
    @continnum_radhe-radhe 2 роки тому +1

    🔥🔥🔥

  • @satyajitmanna8501
    @satyajitmanna8501 Рік тому

    while(i>0); if while loop its no give the error...

  • @SANDEEP_388
    @SANDEEP_388 3 роки тому

    Mam what would be the correct answer? Is it run infinite time or show some error ? Please tell me mam ...

    • @swathisb5191
      @swathisb5191 2 роки тому

      it would print jenny infinite times
      because the condition as no termination so

  • @TechieAman
    @TechieAman 3 роки тому

    Make can you please tell me your plan that which next programming languages you will start teaching
    Like Python C++ etc

  • @ayushvats7279
    @ayushvats7279 3 роки тому +1

    notes chahiye

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 3 роки тому

    Mam very 😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀Iam big fan of you mam

  • @nandinikumari8334
    @nandinikumari8334 2 роки тому

    Jenny would be printed infinite time because of increment operator

  • @agasteen2423
    @agasteen2423 2 роки тому

    Madam y u r taken char data in integer data type , in ex

  • @psyc_taste9616
    @psyc_taste9616 3 роки тому

    9:47 system will print jenny infinite times

  • @RakeshSharma-yx3wb
    @RakeshSharma-yx3wb 2 роки тому

    Answer infinity

  • @fooddieshooddie836
    @fooddieshooddie836 3 роки тому

    Answer is genny would be printed 1 time if there is I++

  • @kalpanasahu9460
    @kalpanasahu9460 3 роки тому +4

    Mam iske baad c++ ka course bhi upload krdo please please...!!

  • @dreypraydev
    @dreypraydev 10 місяців тому

    Since we are incrementing using i++ in a do while loop which executes the statement block before reaching at the condition, it will result into an infinite loop.

  • @BEAST-GOKUL
    @BEAST-GOKUL 4 місяці тому +1

    GOD FOR AVERAGE STUDENTS ❤❤❤🎉🎉🎉🎉

  • @julietrowland6069
    @julietrowland6069 Рік тому

    Finite loop

  • @saibalam7852
    @saibalam7852 3 роки тому

    Infinite loop mam for assignment question