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

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 262

  • @jonasasare5775
    @jonasasare5775 3 года назад +86

    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

  • @relax4523
    @relax4523 Год назад +140

    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

  • @geethasree-pt2fi
    @geethasree-pt2fi 9 месяцев назад +26

    Successfully completed 39 lectures in 1 day

  • @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..

  • @y1_ff
    @y1_ff Год назад +10

    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.

  • @ratiranjanjadav2929
    @ratiranjanjadav2929 3 года назад +15

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

  • @chiradeepbhattacharya4858
    @chiradeepbhattacharya4858 3 года назад +6

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

  • @harshvardhantandon8278
    @harshvardhantandon8278 3 года назад +14

    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 года назад +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 2 года назад

      @@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 2 года назад +1

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

  • @shraddhapawar5674
    @shraddhapawar5674 3 года назад +54

    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.

    • @walkwithme_P62
      @walkwithme_P62 3 года назад +3

      🙏

    • @Abii_r
      @Abii_r 3 года назад +4

      Loop ends and it also prints out of loop

    • @Udtashaitaan
      @Udtashaitaan 3 года назад +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

  • @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.

  • @poornimavasu8020
    @poornimavasu8020 2 года назад +7

    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

  • @vengalasindhuja9484
    @vengalasindhuja9484 Год назад +1

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

  • @ruthrakaran
    @ruthrakaran 3 года назад +7

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

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 3 года назад +5

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

  • @abhimanyugangwar07
    @abhimanyugangwar07 2 года назад +6

    It will be printed till the range of integer

  • @dishantitaliya1912
    @dishantitaliya1912 Год назад +2

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

  • @krishnakarpe409
    @krishnakarpe409 3 года назад +3

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

  • @mhamza8317
    @mhamza8317 2 года назад +2

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

  • @DCEAsmaIqbal
    @DCEAsmaIqbal 2 года назад +1

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

  • @gowthamselvaraj7793
    @gowthamselvaraj7793 Год назад

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

  • @nirmalateju2436
    @nirmalateju2436 5 месяцев назад

    I am running program easily thankyou mam

  • @hariparuchuru3858
    @hariparuchuru3858 2 года назад +21

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

  • @AnuB-y2b
    @AnuB-y2b 10 месяцев назад

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

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 3 года назад +2

    Really Great GOD BLESS YOU Mam

  • @tulakchowdhury4906
    @tulakchowdhury4906 3 года назад +31

    assignment:
    Jenny would be printed infinite times

  • @fakharudin1289
    @fakharudin1289 3 года назад +3

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

  • @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

  • @pavanyegireddy6957
    @pavanyegireddy6957 Год назад

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

  • @malleshsanju5235
    @malleshsanju5235 3 года назад +3

    Mam please explain of c++ Program concepts

  • @DineshKumar-uu5pr
    @DineshKumar-uu5pr 3 года назад +2

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

  • @neverstoplearning3451
    @neverstoplearning3451 Год назад

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

  • @adityabikramjena4584
    @adityabikramjena4584 2 года назад +4

    Starts at 2:00

  • @gokul-since2005
    @gokul-since2005 6 месяцев назад +1

    GOD FOR AVERAGE STUDENTS ❤❤❤🎉🎉🎉🎉

  • @Prasanna-im1zy
    @Prasanna-im1zy Год назад

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

  • @bilalsportsryk
    @bilalsportsryk 3 года назад +4

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

  • @amanprakashnigam5933
    @amanprakashnigam5933 3 года назад

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

  • @siddhartharaj8451
    @siddhartharaj8451 3 года назад

    at 9:48
    it will print infinite times jenney

  • @sandeshv6721
    @sandeshv6721 3 года назад +2

    Very helpful mam..

  • @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...................

  • @DeepakKumar-nk3cv
    @DeepakKumar-nk3cv 3 года назад +4

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

  • @kalpanasahu9460
    @kalpanasahu9460 3 года назад +4

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

  • @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

  • @Akhilkanaboina
    @Akhilkanaboina 2 года назад

    Definatly It is an infinte loop !

  • @Vj_siddhu_fangirl761
    @Vj_siddhu_fangirl761 3 года назад +2

    Pls make video for algorithm mam..

  • @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)

  • @rushikeshsanap1981
    @rushikeshsanap1981 Год назад

    Thank you jayanti ma'am

  • @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

  • @sulectures2773
    @sulectures2773 3 года назад

    Nice ma'am... Tq so much

  • @shayanali8771
    @shayanali8771 3 года назад +1

    Could you please make a video on continue keyword in C

  • @kasyapdharanikota8570
    @kasyapdharanikota8570 3 года назад +1

    please upload a placement series

  • @birsakumhar7240
    @birsakumhar7240 2 года назад

    Thank you mam
    very helpful video

  • @mysterious8198
    @mysterious8198 3 года назад

    Nice explanation ma'am

  • @achintyaroy1084
    @achintyaroy1084 2 года назад

    thank you very much..

  • @slemankhan9533
    @slemankhan9533 2 года назад

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

  • @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

  • @parthshroff7357
    @parthshroff7357 Год назад

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

  • @pradumnpatel5047
    @pradumnpatel5047 3 года назад +1

    Thanks you 🙏🙏🙏mam

  • @greyhat5204
    @greyhat5204 3 года назад +6

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

    • @saurabhsharma2467
      @saurabhsharma2467 2 месяца назад

      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.

  • @abhishekvanenooru4959
    @abhishekvanenooru4959 2 года назад +1

    Tq akka

  • @ifhammohamed1955
    @ifhammohamed1955 2 года назад +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..

  • @RakeshSharma-yx3wb
    @RakeshSharma-yx3wb 2 года назад

    Answer infinity

  • @psyc_taste9616
    @psyc_taste9616 3 года назад

    9:47 system will print jenny infinite times

  • @aashrithaganga7492
    @aashrithaganga7492 2 года назад +1

    Jenny is printed 32768 times then out of loop

  • @abhayamoharana9297
    @abhayamoharana9297 3 года назад

    Mam plz tell me which language is best

  • @KeerthiGovindasu
    @KeerthiGovindasu 11 месяцев назад

    thank you maam

  • @siddeshwaragencybasavaraj7605
    @siddeshwaragencybasavaraj7605 2 года назад

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

  • @maryannemuthoni5388
    @maryannemuthoni5388 11 месяцев назад

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

  • @varunchaudhary6446
    @varunchaudhary6446 3 года назад

    Superb mam

  • @dharmendrasharma9317
    @dharmendrasharma9317 3 года назад

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

  • @AKASHAKASH-sp4yd
    @AKASHAKASH-sp4yd 2 года назад

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

  • @AJAYKUMAR-ti2dl
    @AJAYKUMAR-ti2dl 3 года назад

    Hello mam
    Please tell better book for data structure

  • @741ibrahim2
    @741ibrahim2 3 года назад

    mam its infinate loop because condition 1 >0

  • @crazythinkers642
    @crazythinkers642 13 дней назад

    8:8 infinte times

  • @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

  • @sourav9352
    @sourav9352 11 месяцев назад

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

  • @udaysinghrana5725
    @udaysinghrana5725 2 года назад

    9:44
    Jenny will be printed 65536 times

  • @dreypraydev
    @dreypraydev Год назад

    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.

  • @brindhavenugopal4395
    @brindhavenugopal4395 3 года назад

    Mam. Please explain pattern programs in C

  • @rajeshkumar-uk2jo
    @rajeshkumar-uk2jo 2 года назад

    Tq so much mam

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 3 года назад

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

  • @jitendrapratapsingh9189
    @jitendrapratapsingh9189 2 года назад +1

    int i = 0;
    do
    {
    printf("%d
    " , i);
    i++;
    }while (i>0);
    printf ("out of loop");
    return 0;
    }
    output - infinite loop

    • @mitulprajapati4654
      @mitulprajapati4654 2 года назад

      No it can't print infinite times because it is post incriment so it prints only one time.

    • @funkyboys8403
      @funkyboys8403 2 года назад

      @@mitulprajapati4654 no it's print infinite times bro because ,if single i++ is always increment continuosly it would be rather i++ or++i

  • @mrantisocial3522
    @mrantisocial3522 2 года назад +1

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

    • @YashPavaskar
      @YashPavaskar 2 года назад

      Aur hello world???

    • @YashPavaskar
      @YashPavaskar 2 года назад

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

  • @fooddieshooddie836
    @fooddieshooddie836 3 года назад

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

  • @challarekha3309
    @challarekha3309 Год назад

    Mam what's the purpose of do

  • @sudhirkundurthi5150
    @sudhirkundurthi5150 3 года назад

    Mam start uploading c++ course also

  • @AbhishekKumar-qj2qh
    @AbhishekKumar-qj2qh Год назад

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

  • @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 3 года назад

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

  • @chaithray3138
    @chaithray3138 3 года назад +2

    32768 times jenny would be printed

  • @473g.koteswaraiah3
    @473g.koteswaraiah3 3 года назад

    Mam what is use of doing programming

  • @Ravi44446
    @Ravi44446 3 года назад

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

  • @TechieAman
    @TechieAman 3 года назад

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

  • @ashwinisahu9326
    @ashwinisahu9326 3 года назад +3

    Jenny will be printed infinite times

  • @143nivvytechchannel6
    @143nivvytechchannel6 Год назад

    nice video

  • @satyajitmanna8501
    @satyajitmanna8501 Год назад

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

  • @abdulrahimjalloh363
    @abdulrahimjalloh363 Год назад

    int i=0;
    do
    {
    printf("Jenny");
    i++;
    }while(i>0);
    printf("Out of loop);
    the output will be printed once:
    "Jenny out of loop"

  • @The_boyssz
    @The_boyssz Год назад

    32767 time the statement should be printed

  • @ankushsarkar685
    @ankushsarkar685 4 месяца назад

    It is finite

  • @JungleFiles7
    @JungleFiles7 2 года назад

    answer of your last question is jenny printed infinite time this is a infinite loop.

  • @Dipanshu________Rajput
    @Dipanshu________Rajput Год назад +1

    infinited times the loop i++