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

  Рет қаралды 177,917

Jenny's Lectures CS IT

3 жыл бұрын

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: kzbin.info/aero/PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_S
*********************************************************
Connect & Contact Me:
Jenny's Lecture Hindi: www.youtube.com/@JennyslecturesHINDI
Facebook: Jennys-Lectures-CSIT-Netjrf-316814368950701/
Quora: www.quora.com/profile/Jayanti-Khatri-Lamba
Instagram: jayantikhatrilamba
Twitter: KhatriJenny
*************************************************************
More Playlists:
C++ Tutorials for beginners: kzbin.info/www/bejne/gYrbfXh6e5ueoNU
Best Python Tutorials for Beginners: kzbin.info/aero/PLdo5W4Nhv31bZSiqiOL5ta39vSnBxpOPT
Printing Pattern in C: kzbin.info/aero/PLdo5W4Nhv31Yu1igxTE2x0aeShbKtVcCy
Placement Series: kzbin.info/aero/PLdo5W4Nhv31YvlDpJhvOYbM9Ap8UypgEy
Data Structures and Algorithms: https: kzbin.info/aero/PLdo5W4Nhv31bbKJzrsKfMpo_grxuLl8LU
Design and Analysis of Algorithms(DAA): kzbin.info/aero/PLdo5W4Nhv31ZTn2P9vF02bkb3SC8uiUUn
Dynamic Programming: kzbin.info/aero/PLdo5W4Nhv31aBrJE1WS4MR9LRfbmZrAQu
Operating Systems tutorials: //kzbin.info/aero/PLdo5W4Nhv31a5ucW_S1K3-x6ztBRD-PNa
DBMS Tutorials: kzbin.info/aero/PLdo5W4Nhv31b33kF46f9aFjoJPOkdlsRc
#forloop #loop #cprogramming #coding #jennyslectures #whileloop
#dowhileloopinC

Пікірлер: 262
@relax4523
@relax4523 Жыл бұрын
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
@ourculture7079
@ourculture7079 Жыл бұрын
Yes
@madhurikamitikari6102
@madhurikamitikari6102 Жыл бұрын
👌
@jashankaur3726
@jashankaur3726 Жыл бұрын
very nice frnd 🎀
@PSPK_3105
@PSPK_3105 Жыл бұрын
nice man
@anuradhaKurimina-fp1ve
@anuradhaKurimina-fp1ve Жыл бұрын
Soopar bro
@jonasasare5775
@jonasasare5775 3 жыл бұрын
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 8 ай бұрын
Successfully completed 39 lectures in 1 day
@Karanam.vijaykiran
@Karanam.vijaykiran Ай бұрын
😮
@PrashanthReddy-123
@PrashanthReddy-123 3 күн бұрын
Fault
@y1_ff
@y1_ff Жыл бұрын
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.
@Baby.Yoda.knows.tech.
@Baby.Yoda.knows.tech. 3 жыл бұрын
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..
@shraddhapawar5674
@shraddhapawar5674 3 жыл бұрын
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 жыл бұрын
🙏
@Abii_r
@Abii_r 3 жыл бұрын
Loop ends and it also prints out of loop
@Udtashaitaan
@Udtashaitaan 3 жыл бұрын
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 жыл бұрын
@@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 Жыл бұрын
@@tattikumar8727 condition will be false when I becomes -32768
@ratiranjanjadav2929
@ratiranjanjadav2929 3 жыл бұрын
You are doing great job mam...may God bless u with good health .
@harshvardhantandon8278
@harshvardhantandon8278 3 жыл бұрын
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 жыл бұрын
@@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 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 жыл бұрын
@@harshgoyal3553 technically is correct as the data type int range from -32768 to 32767 but it's count to be infinity
@chiradeepbhattacharya4858
@chiradeepbhattacharya4858 3 жыл бұрын
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.
@chiradeepbhattacharya4858
@chiradeepbhattacharya4858 3 жыл бұрын
Thanks for your constant support maam, you are the reason why I started to love programming from being afraid of.
@ruthrakaran
@ruthrakaran 3 жыл бұрын
9:41 #include main() { int i=0; do{ printf (" jenny"); }while (i>0); printf(" not "); return 0; } Output: Jenny printed infinity times
@poornimavasu8020
@poornimavasu8020 2 жыл бұрын
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
@abhimanyugangwar07
@abhimanyugangwar07 2 жыл бұрын
It will be printed till the range of integer
@gowthamselvaraj7793
@gowthamselvaraj7793 Жыл бұрын
very good explaination now get the point that do while will execute once without checking the condition.....
@vengalasindhuja9484
@vengalasindhuja9484 Жыл бұрын
In love with this teaching mam❤ Thankyou for your efforts in teaching us flawlessly 💯
@hariparuchuru3858
@hariparuchuru3858 2 жыл бұрын
if we use i++ in the loop it will become infinite loop
@indranilbhattacharjee201
@indranilbhattacharjee201 Жыл бұрын
Yes
@aemanmustafa7296
@aemanmustafa7296 Жыл бұрын
Yes
@krishnamanchala6280
@krishnamanchala6280 Жыл бұрын
Yes
@NipunRawat08
@NipunRawat08 Жыл бұрын
I guess as she taught the integer has a limited value raging from about 39000 to -39000 so the loop will be a finite loop. it may appear like a infinite loop but it will be terminated at some pouint according to value of the datatype
@nimishas7704
@nimishas7704 Жыл бұрын
L
@mhamza8317
@mhamza8317 2 жыл бұрын
It will print upto the max positive value of computer..
@tulakchowdhury4906
@tulakchowdhury4906 3 жыл бұрын
assignment: Jenny would be printed infinite times
@pool_dead3961
@pool_dead3961 Жыл бұрын
no
@nirmalateju2436
@nirmalateju2436 4 ай бұрын
I am running program easily thankyou mam
@Prasanna-im1zy
@Prasanna-im1zy Жыл бұрын
At 9:45 If we use short int then range would be -32768 to 32767 So it prints 32767 times
@adityabikramjena4584
@adityabikramjena4584 2 жыл бұрын
Starts at 2:00
@AnuB-y2b
@AnuB-y2b 10 ай бұрын
Hi mam you are awesome superb thank you so much we learn a lot in this subject ❤
@dishantitaliya1912
@dishantitaliya1912 Жыл бұрын
Such a very nice explanation in all lectures without taking any fees.thanks a lot god bless you.stay happy forever
@maheshkumar-tx7hz
@maheshkumar-tx7hz 2 жыл бұрын
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 Жыл бұрын
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
@nagendrachariramadugu5342
@nagendrachariramadugu5342 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
@malleshsanju5235
@malleshsanju5235 3 жыл бұрын
Mam please explain of c++ Program concepts
@DCEAsmaIqbal
@DCEAsmaIqbal 2 жыл бұрын
Thankyou i am going to giving my viva with the help of your videos
@siddhartharaj8451
@siddhartharaj8451 3 жыл бұрын
at 9:48 it will print infinite times jenney
@fakharudin1289
@fakharudin1289 3 жыл бұрын
respect from pakistan ma'am your are very decent and intelligent
@singarigallapavankumar4724
@singarigallapavankumar4724 3 жыл бұрын
What a pin point accuracy teaching mam ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️
@bilalsportsryk
@bilalsportsryk 3 жыл бұрын
I from Pakiatan I am a programmer But Ma'am I have also like your lecture
@priyanshuhurmade8626
@priyanshuhurmade8626 3 жыл бұрын
Hello brother ❤️ from India
@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??
@gokul-since2005
@gokul-since2005 6 ай бұрын
GOD FOR AVERAGE STUDENTS ❤❤❤🎉🎉🎉🎉
@krishnakarpe409
@krishnakarpe409 3 жыл бұрын
Nice explanation ma'ma .your teaching methods are just superb.
@DeepakKumar-nk3cv
@DeepakKumar-nk3cv 3 жыл бұрын
Mam parallely start c++ course.......🙏🙏🙏
@AKASHAKASH-sp4yd
@AKASHAKASH-sp4yd 2 жыл бұрын
mam i think we use i++ at loop ,we get a infinite ....pls reply it is correct are not?
@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
@neverstoplearning3451
@neverstoplearning3451 Жыл бұрын
Thank you so so much ma'am for cleaning concept of do while loop
@greyhat5204
@greyhat5204 3 жыл бұрын
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.
@rushikeshsanap1981
@rushikeshsanap1981 Жыл бұрын
Thank you jayanti ma'am
@pavanyegireddy6957
@pavanyegireddy6957 Жыл бұрын
Mam very very thank you for your free lectures . It is amazing
@amanprakashnigam5933
@amanprakashnigam5933 3 жыл бұрын
वाह मैडम जी वाह समझ में आ गया नमस्ते
@parthshroff7357
@parthshroff7357 Жыл бұрын
9:39 128 times "Jenny" will be printed mam.
@abhayamoharana9297
@abhayamoharana9297 3 жыл бұрын
Mam plz tell me which language is best
@pavankumarsingarigalla7165
@pavankumarsingarigalla7165 3 жыл бұрын
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
@kalpanasahu9460
@kalpanasahu9460 3 жыл бұрын
Mam iske baad c++ ka course bhi upload krdo please please...!!
@mohitmanoj4436
@mohitmanoj4436 2 жыл бұрын
Apna number send kar na
@singarigallapavankumar4724
@singarigallapavankumar4724 3 жыл бұрын
Really Great GOD BLESS YOU Mam
@suryatej2573
@suryatej2573 2 жыл бұрын
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
@Vj_siddhu_fangirl761
@Vj_siddhu_fangirl761 3 жыл бұрын
Pls make video for algorithm mam..
@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
@slemankhan9533
@slemankhan9533 2 жыл бұрын
looking very nice mam i cannot learn coding......
@DineshKumar-uu5pr
@DineshKumar-uu5pr 3 жыл бұрын
Such a great lecture mam love you lot mam♥️😘I understand depth in c programming
@shayanali8771
@shayanali8771 3 жыл бұрын
Could you please make a video on continue keyword in C
@maryannemuthoni5388
@maryannemuthoni5388 11 ай бұрын
At 9:39 it will go through range then when i becomes 0 it stops and prints out of loop
@pushpaka.fasate6170
@pushpaka.fasate6170 3 жыл бұрын
mam please make a video on time complexity. You are doing great job mam your video lecture are so helpful...................
@Akhilkanaboina
@Akhilkanaboina 2 жыл бұрын
Definatly It is an infinte loop !
@challarekha3309
@challarekha3309 Жыл бұрын
Mam what's the purpose of do
@kasyapdharanikota8570
@kasyapdharanikota8570 3 жыл бұрын
please upload a placement series
@AJAYKUMAR-ti2dl
@AJAYKUMAR-ti2dl 3 жыл бұрын
Hello mam Please tell better book for data structure
@RakeshSharma-yx3wb
@RakeshSharma-yx3wb 2 жыл бұрын
Answer infinity
@ifhammohamed1955
@ifhammohamed1955 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..
@TechieAman
@TechieAman 3 жыл бұрын
Make can you please tell me your plan that which next programming languages you will start teaching Like Python C++ etc
@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
@achintyaroy1084
@achintyaroy1084 2 жыл бұрын
thank you very much..
@473g.koteswaraiah3
@473g.koteswaraiah3 3 жыл бұрын
Mam what is use of doing programming
@741ibrahim2
@741ibrahim2 3 жыл бұрын
mam its infinate loop because condition 1 >0
@sandeshv6721
@sandeshv6721 3 жыл бұрын
Very helpful mam..
@psyc_taste9616
@psyc_taste9616 3 жыл бұрын
9:47 system will print jenny infinite times
@siddeshwaragencybasavaraj7605
@siddeshwaragencybasavaraj7605 2 жыл бұрын
Yes ma'am ... Please reach us c++
@AbhishekKumar-qj2qh
@AbhishekKumar-qj2qh Жыл бұрын
if we use i++ it will give infinie times jenny
@birsakumhar7240
@birsakumhar7240 2 жыл бұрын
Thank you mam very helpful video
@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.
@satyajitmanna8501
@satyajitmanna8501 Жыл бұрын
while(i>0); if while loop its no give the error...
@aashrithaganga7492
@aashrithaganga7492 2 жыл бұрын
Jenny is printed 32768 times then out of loop
@sudhirkundurthi5150
@sudhirkundurthi5150 3 жыл бұрын
Mam start uploading c++ course also
@daddygamingyt74
@daddygamingyt74 3 жыл бұрын
Dear why don't you make tutorial on java ?..
@sulectures2773
@sulectures2773 3 жыл бұрын
Nice ma'am... Tq so much
@agasteen2423
@agasteen2423 2 жыл бұрын
Madam y u r taken char data in integer data type , in ex
@fooddieshooddie836
@fooddieshooddie836 3 жыл бұрын
Answer is genny would be printed 1 time if there is I++
@KeerthiGovindasu
@KeerthiGovindasu 11 ай бұрын
thank you maam
@udaysinghrana5725
@udaysinghrana5725 2 жыл бұрын
9:44 Jenny will be printed 65536 times
@crazythinkers642
@crazythinkers642 6 күн бұрын
8:8 infinte times
@mrantisocial3522
@mrantisocial3522 2 жыл бұрын
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
@143nivvytechchannel6
@143nivvytechchannel6 Жыл бұрын
nice video
@mamoonkhan490
@mamoonkhan490 3 жыл бұрын
mam when we write i++ in do loop then it will print infinite
@mysterious8198
@mysterious8198 3 жыл бұрын
Nice explanation ma'am
@abhishekvanenooru4959
@abhishekvanenooru4959 2 жыл бұрын
Tq akka
@dharmendrasharma9317
@dharmendrasharma9317 3 жыл бұрын
Mam your teaching way is beautiful 🌺🌹 and you are also so much beautiful 🌺🌺🙏🙏
@pradumnpatel5047
@pradumnpatel5047 3 жыл бұрын
Thanks you 🙏🙏🙏mam
@brindhavenugopal4395
@brindhavenugopal4395 3 жыл бұрын
Mam. Please explain pattern programs in C
@jitendrapratapsingh9189
@jitendrapratapsingh9189 2 жыл бұрын
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
@Ravi44446
@Ravi44446 3 жыл бұрын
Mam can u plz give lectures on core Java I'm from Haryana
@nithishrajendran3295
@nithishrajendran3295 Жыл бұрын
It's become infinite mam
@BlindTV.official
@BlindTV.official Жыл бұрын
sonu sharma sir se milna h sir please please please sir humble request sir..!!!!
@mihirkumar629
@mihirkumar629 9 ай бұрын
int i=1; for(i
@rajeshkumar-uk2jo
@rajeshkumar-uk2jo 2 жыл бұрын
Tq so much mam
@julietrowland6069
@julietrowland6069 Жыл бұрын
Finite loop
@ankushsarkar685
@ankushsarkar685 4 ай бұрын
It is finite
@ashwinisahu9326
@ashwinisahu9326 3 жыл бұрын
Jenny will be printed infinite times
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 8 МЛН
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
kak budto
Рет қаралды 1,3 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 8 МЛН