Video není dostupné.
Omlouváme se.

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

Sdílet
Vložit
  • čas přidán 21. 01. 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/...
    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

Komentáře • 258

  • @relax4523
    @relax4523 Před rokem +127

    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 Před 3 lety +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

  • @shraddhapawar5674
    @shraddhapawar5674 Před 3 lety +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 Před 3 lety +3

      🙏

    • @Abii_r
      @Abii_r Před 3 lety +4

      Loop ends and it also prints out of loop

    • @Udtashaitaan
      @Udtashaitaan Před 3 lety +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 Před 2 lety +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 Před rokem +1

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

  • @y1_ff
    @y1_ff Před 11 měsíci +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.

  • @geethasree-pt2fi
    @geethasree-pt2fi Před 6 měsíci +4

    Successfully completed 39 lectures in 1 day

  • @Baby.Yoda.knows.tech.
    @Baby.Yoda.knows.tech. Před 3 lety +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..

  • @ratiranjanjadav2929
    @ratiranjanjadav2929 Před 3 lety +15

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

  • @harshvardhantandon8278
    @harshvardhantandon8278 Před 2 lety +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 Před 2 lety

      Can u pls explain, how?

    • @harshgoyal3553
      @harshgoyal3553 Před 2 lety +8

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

    • @jeelanibasha3984
      @jeelanibasha3984 Před 2 lety +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 Před rokem

      @@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 Před rokem +1

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

  • @hariparuchuru3858
    @hariparuchuru3858 Před 2 lety +21

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

  • @chiradeepbhattacharya4858

    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.

  • @ruthrakaran
    @ruthrakaran Před 3 lety +7

    9:41
    #include
    main() {
    int i=0;
    do{
    printf ("
    jenny");
    }while (i>0);
    printf("
    not ");
    return 0;
    } Output: Jenny printed infinity times

  • @poornimavasu8020
    @poornimavasu8020 Před 2 lety +6

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

    • @surya..g
      @surya..g Před rokem

      No infinite it will print up -32767 condition become false

  • @chiradeepbhattacharya4858

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

  • @abhimanyugangwar07
    @abhimanyugangwar07 Před 2 lety +4

    It will be printed till the range of integer

  • @tulakchowdhury4906
    @tulakchowdhury4906 Před 3 lety +30

    assignment:
    Jenny would be printed infinite times

  • @singarigallapavankumar4724

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

  • @vengalasindhuja9484
    @vengalasindhuja9484 Před rokem +1

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

  • @mhamza8317
    @mhamza8317 Před rokem +1

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

  • @adityabikramjena4584
    @adityabikramjena4584 Před 2 lety +4

    Starts at 2:00

  • @nagendrachariramadugu5342

    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 Před rokem

      no, it prints "jenny " infinite times.

    • @crazywiper3908
      @crazywiper3908 Před rokem

      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

  • @nirmalateju2436
    @nirmalateju2436 Před 2 měsíci

    I am running program easily thankyou mam

  • @greyhat5204
    @greyhat5204 Před 3 lety +6

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

    • @saurabhsharma2467
      @saurabhsharma2467 Před 14 dny

      It's because of value of int it will automatically takes signed integer that's why it's running infinite times its range is -2147483648 to 2147483647 that's why.

  • @Prasanna-im1zy
    @Prasanna-im1zy Před 11 měsíci

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

  • @bilalprogrammer
    @bilalprogrammer Před 3 lety +4

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

  • @user-hj7ff1rr8n
    @user-hj7ff1rr8n Před 8 měsíci

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

  • @DCEAsmaIqbal
    @DCEAsmaIqbal Před 2 lety +1

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

  • @abhishekvanenooru4959
    @abhishekvanenooru4959 Před 2 lety +1

    Tq akka

  • @krishnakarpe409
    @krishnakarpe409 Před 3 lety +3

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

  • @DeepakKumar-nk3cv
    @DeepakKumar-nk3cv Před 3 lety +4

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

  • @dishantitaliya1912
    @dishantitaliya1912 Před rokem +2

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

  • @pavankumarsingarigalla7165

    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

  • @fakharudin1289
    @fakharudin1289 Před 3 lety +3

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

  • @gowthamselvaraj7793
    @gowthamselvaraj7793 Před rokem

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

  • @BEAST-GOKUL
    @BEAST-GOKUL Před 4 měsíci +1

    GOD FOR AVERAGE STUDENTS ❤❤❤🎉🎉🎉🎉

  • @singarigallapavankumar4724

    Really Great GOD BLESS YOU Mam

  • @malleshsanju5235
    @malleshsanju5235 Před 3 lety +2

    Mam please explain of c++ Program concepts

  • @DineshKumar-uu5pr
    @DineshKumar-uu5pr Před 3 lety +2

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

  • @maheshkumar-tx7hz
    @maheshkumar-tx7hz Před 2 lety +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)

  • @rameshejjigani8950
    @rameshejjigani8950 Před rokem

    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

  • @kalpanasahu9460
    @kalpanasahu9460 Před 3 lety +4

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

  • @ifhammohamed1955
    @ifhammohamed1955 Před 2 lety +2

    #include
    int main()
    {
    int i=0 , a;
    do
    {
    printf("Jenny%d",a);
    i++;
    a++;
    }while(i>0);
    printf("this is infinite loop");
    }
    >>>this is infinite loop mam..

  • @neverstoplearning3451

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

  • @pavanyegireddy6957
    @pavanyegireddy6957 Před rokem

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

  • @Vj_siddhu_fangirl761
    @Vj_siddhu_fangirl761 Před 3 lety +2

    Pls make video for algorithm mam..

  • @suryatej2573
    @suryatej2573 Před 2 lety +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

  • @sandeshv6721
    @sandeshv6721 Před 3 lety +2

    Very helpful mam..

  • @amanprakashnigam5933
    @amanprakashnigam5933 Před 3 lety

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

  • @shayanali8771
    @shayanali8771 Před 3 lety +1

    Could you please make a video on continue keyword in C

  • @siddhartharaj8451
    @siddhartharaj8451 Před 3 lety

    at 9:48
    it will print infinite times jenney

  • @pushpaka.fasate6170
    @pushpaka.fasate6170 Před 3 lety +1

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

  • @kasyapdharanikota8570
    @kasyapdharanikota8570 Před 3 lety +1

    please upload a placement series

  • @Akhilkanaboina
    @Akhilkanaboina Před 2 lety

    Definatly It is an infinte loop !

  • @rushikeshsanap1981
    @rushikeshsanap1981 Před rokem

    Thank you jayanti ma'am

  • @aashrithaganga7492
    @aashrithaganga7492 Před 2 lety +1

    Jenny is printed 32768 times then out of loop

  • @balanjaneyasharma4347
    @balanjaneyasharma4347 Před 3 lety +1

    Excellent 👌 lecture

  • @maryannemuthoni5388
    @maryannemuthoni5388 Před 9 měsíci

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

  • @birsakumhar7240
    @birsakumhar7240 Před 2 lety

    Thank you mam
    very helpful video

  • @pradumnpatel5047
    @pradumnpatel5047 Před 3 lety +1

    Thanks you 🙏🙏🙏mam

  • @psyc_taste9616
    @psyc_taste9616 Před 3 lety

    9:47 system will print jenny infinite times

  • @achintyaroy1084
    @achintyaroy1084 Před 2 lety

    thank you very much..

  • @sulectures2773
    @sulectures2773 Před 3 lety

    Nice ma'am... Tq so much

  • @chaithray3138
    @chaithray3138 Před 2 lety +2

    32768 times jenny would be printed

  • @slemankhan9533
    @slemankhan9533 Před 2 lety

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

  • @mysterious8198
    @mysterious8198 Před 3 lety

    Nice explanation ma'am

  • @civilgaming1098
    @civilgaming1098 Před 2 lety

    Thank you so much

  • @dreypraydev
    @dreypraydev Před 11 měsíci

    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.

  • @rishavvats9038
    @rishavvats9038 Před 3 lety

    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

  • @RakeshSharma-yx3wb
    @RakeshSharma-yx3wb Před 2 lety

    Answer infinity

  • @parthshroff7357
    @parthshroff7357 Před 10 měsíci

    9:39 128 times "Jenny" will be printed mam.

  • @KeerthiGovindasu
    @KeerthiGovindasu Před 8 měsíci

    thank you maam

  • @dharmendrasharma9317
    @dharmendrasharma9317 Před 2 lety

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

  • @SANDEEP_388
    @SANDEEP_388 Před 3 lety

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

    • @swathisb5191
      @swathisb5191 Před 2 lety

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

  • @mrantisocial3522
    @mrantisocial3522 Před 2 lety +1

    It prints : Jenny Jenny Jenny Jenny (infinity) time print.

    • @YashPavaskar
      @YashPavaskar Před rokem

      Aur hello world???

    • @YashPavaskar
      @YashPavaskar Před rokem

      Bhai hello bhi print hote jayega na??
      Q ki condition condition true hai

  • @rajeshkumar-uk2jo
    @rajeshkumar-uk2jo Před 2 lety

    Tq so much mam

  • @siddeshwaragencybasavaraj7605

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

  • @chohan2253
    @chohan2253 Před rokem

    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

  • @gulamsarwar609
    @gulamsarwar609 Před 3 lety +1

    Jenny'll printed 65535times

  • @varunchaudhary6446
    @varunchaudhary6446 Před 3 lety

    Superb mam

  • @sourav9352
    @sourav9352 Před 9 měsíci

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

  • @aashishkumar5520
    @aashishkumar5520 Před 3 lety +26

    Mam, sorry but you are so beautiful ❤️ really so beautiful woman ❤️🔥🔥🔥

  • @fooddieshooddie836
    @fooddieshooddie836 Před 3 lety

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

  • @premraj1456
    @premraj1456 Před 3 lety

    Thanks mam

  • @AKASHAKASH-sp4yd
    @AKASHAKASH-sp4yd Před rokem

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

  • @ashwinisahu9326
    @ashwinisahu9326 Před 3 lety +3

    Jenny will be printed infinite times

  • @singarigallapavankumar4724

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

  • @julietrowland6069
    @julietrowland6069 Před rokem

    Finite loop

  • @Dipanshu________Rajput
    @Dipanshu________Rajput Před 10 měsíci +1

    infinited times the loop i++

  • @741ibrahim2
    @741ibrahim2 Před 3 lety

    mam its infinate loop because condition 1 >0

  • @ankushsarkar685
    @ankushsarkar685 Před 2 měsíci

    It is finite

  • @udaysinghrana5725
    @udaysinghrana5725 Před rokem

    9:44
    Jenny will be printed 65536 times

  • @brindhavenugopal4395
    @brindhavenugopal4395 Před 3 lety

    Mam. Please explain pattern programs in C

  • @sayansaha5326
    @sayansaha5326 Před 2 lety

    Thanks didi

  • @AbhishekKumar-qj2qh
    @AbhishekKumar-qj2qh Před rokem

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

  • @nithishrajendran3295
    @nithishrajendran3295 Před rokem

    It's become infinite mam

  • @AJAYKUMAR-ti2dl
    @AJAYKUMAR-ti2dl Před 3 lety

    Hello mam
    Please tell better book for data structure

  • @ayushvats7279
    @ayushvats7279 Před 3 lety +1

    notes chahiye

  • @sudhirkundurthi5150
    @sudhirkundurthi5150 Před 3 lety

    Mam start uploading c++ course also

  • @satyajitmanna8501
    @satyajitmanna8501 Před rokem

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

  • @vamshibhumani4742
    @vamshibhumani4742 Před 2 lety

    Super

  • @nagapilla1452
    @nagapilla1452 Před 3 lety

    Nice...