2:55 , i like how you noted that you need to put the semicolon after the "do...while" function while you did not use your own advice
@tatanim50484 жыл бұрын
😂😂😂
@sweekritakumari89544 жыл бұрын
Exactly 😂😂😂
@sanguin33 жыл бұрын
He actually did that "on purpose".
@karthikgunnam11023 жыл бұрын
Same doubt bro
@shashikumar-rw1zc2 жыл бұрын
Right bro
@aishwarya82535 жыл бұрын
Really ur explanation is great sir Even the one who do not know the c -lang by listening to this I’m sure that they’ll understand C lang clearly . Tq sir.......
@hinataaaaaaaa9 ай бұрын
Minutes of struggle solved in seconds
@naveedsab135210 ай бұрын
For (int I=o;i
@siulichatterjee36523 жыл бұрын
Whenever he says "right?", I fear that in the very next moment he'll say ," wrong! !"😄😄
@chocolittlecrushon2012 жыл бұрын
Printf also ; missing
@hue83622 жыл бұрын
Same
@bharathvyaas70272 жыл бұрын
Me to
@monikamanhas7172 жыл бұрын
Me too🤣
@srijapotnuru3801 Жыл бұрын
@@chocolittlecrushon201is that mean the structure of programming is wrong...? I don't know just asking could you tell me please 😊
@miroslavblagoev58872 жыл бұрын
Thank you for the video, I just want to sat that - this code also works, uses while instead of do-while, and gives same output as your do-while loop with the same with even fewer lines. int n; while(n != 0){ printf("Enter an integer ") scanf("%d",&n); }
@zaugitude Жыл бұрын
Yes, I tested this and it works. Here is the interesting thing, in the following code, the initial printf statement prints n with a value of 32764 to 32767 ( I only ran it a few times). If I comment out the while construct the printf statement then gives n a value of zero. Does the compiler see that it needs a non-zero value to make the while loop valid or what? int n; printf("n = %d ", n); while(n != 0){ printf("Enter an integer "); scanf("%d", &n); }
@miroslavblagoev5887 Жыл бұрын
@@zaugitude in C, Static variables (file scope and function static) are initialized to zero, but non-static variables (local variables) are indeterminate. Reading them prior to assigning a value results in undefined behavior. For example, if the above is in main, n start with 0, but if you have a function, and there you use this code, you will get unpredicted values. Also note that if the value in the brackets is not true, the code below will not execute. :)
@saptadeepghosh6688 ай бұрын
For the while loop just initialize the n value with 1 before the loop starts , so it enters the loop as i>0. And you also don't need to take input before the while loop.
@Anthony-ri2vp2 жыл бұрын
I hate this, just use a for loop
@mohamedyousufrahman4954Ай бұрын
😂😂me too, same mindset
@compangit1524 Жыл бұрын
Comments for myself: normal while loop is the while-do loop. Then, we have another loop which is called the do-while loop. do-while loop is used when we want to execute the body of the loop at least ONCE.
@OneBAIDEN Жыл бұрын
Smart
@ahmed65691804 жыл бұрын
thank you for ur amazing explanation. a small note: there is a missing ';' at the last do-while example you entere.
@TheoTime-bk9fk11 ай бұрын
im learning c++ thanks a lot
@ksofficerofficer78585 ай бұрын
Every time I watch your teaching videos I'm getting better, Thank you so much
@nehagupta36682 жыл бұрын
Sir 🗣️a small note: there is a missing 👉';' at the last do-while example you entere.✍️
@BTMINSiddhiChobe3 жыл бұрын
On 3:55, the program of do-while , there should be a semicolon after while
@the.merciful173 жыл бұрын
r u sure
@Kasko-na-raja3 жыл бұрын
Same doubt
@guddititejesh54263 жыл бұрын
Ha yes.dude
@rokonalichowdhury9760 Жыл бұрын
#include int main(void) { char ch; do { printf("Enter: "); ch = getchar(); } while (ch != 'q'); printf("Great"); } Note: It displays a single enter at the start but in the second time, it displays double enter.
@AK--vc9wd3 жыл бұрын
I will learn full C from neso academy.
@danielmuibi2834Ай бұрын
i love the explanation short and precise
@amandeepsinghdhillon1432 жыл бұрын
My 2 hours work you solved in 2-3 minutes sir I am sure that your channel will be sure in top 10 ❤
@A_A-qe3gx4 жыл бұрын
Thank you sir for this video it's really good!!!
@UruzStrong4 жыл бұрын
What a fantastic tutorial, I struggled with this for a long time before seeing your video. Thank you
@reshamxsk4 жыл бұрын
Same here!
@ergoproxy30322 жыл бұрын
i like the explanation but when i removed the first printf and scanf from while loop it still works perfectly fine and as we want like this, therefore i still dont get the difference: #include int main() { int n; while(n!=0) { printf("enter integer"); scanf("%d", &n); } printf("staaaaghp"); return 0; }
@UttamKumar-dp9dp Жыл бұрын
Where are you writing the code? I'm using replit and this code is not working
@AspirantTD-warriorАй бұрын
I think it's because int n; in some compilers automatically gives the value 1 and in some other automatically gives value 0, so maybe what he discussed was for initial value 0, the loop won't run, and maybe in your compiler, the initial default value is non-zero so that's why it's happening
@baohuariley57406 ай бұрын
thank you so much. Now I understand difference between while and do while loop
@iqmal39102 жыл бұрын
Excellent explanation sir VERY HELPFUL VIDEO
@Pritamdas-bg7fp6 жыл бұрын
neso academy is the best
@celestinefrancis84012 жыл бұрын
really extraordinary
@damla135673 жыл бұрын
int b=0; int c=9; do { if(c
@kapkoder40094 жыл бұрын
Thanks for the explanation, now I understand
@juanparada131926 күн бұрын
Better than Chat-GPT 🙌🏽
@deepakj37275 жыл бұрын
4.10 you missed the semicolon in do while loop's side
@sitanshuravi33285 жыл бұрын
It is because he too didn't has used do- while much
@saulaur4 жыл бұрын
I think it is @2:42 :-)
@GurmeetKaur-vi4ygАй бұрын
Thanks sir
@jimmymesa5 жыл бұрын
Putting a semicolon at the end is probably necessary for the compiler to parse the source code properly.
@AakashYadav-ch9un3 жыл бұрын
Instead of that printf and scanf function we can just simply initialise n=1 in while loop
@arunjithajith79583 жыл бұрын
But in the question user need to give the value
@asdjkk12972 жыл бұрын
4:00 look at the while program . You are not terminating the scanf function
@S7VENFILM5 жыл бұрын
Watching you grow. Thanks for sharing
@mousaismail87572 жыл бұрын
I like this method of teaching
@navkaransinghbrar43806 жыл бұрын
Thats it ....I hoped u will post Programming videos.....I will watch whole of them but keep posting ....and also on java and C++
@ritikshrivastava94424 жыл бұрын
If somebody wants to know how to write the same program using for loop int main() { for (int i; i != 0;) { printf("enter an integer "); scanf("%d",&i); } printf("you're out of loop"); return 0; }
@brunobiega2 жыл бұрын
what does the ,,&" sign before variable ,,i" mian?
@kennardsugirotok73743 жыл бұрын
You are a very great teacher!
@MarcGyverIt3 жыл бұрын
Your explanations are the best out there. If you have a paid course, I will sign up for it.
@saritasingh37133 жыл бұрын
Thank you sir. All my doubts are cleared
@vaibhavgurav62913 жыл бұрын
Thank you i understand but second example your missing semicolon sir but sir thank you giving explanation.
@mdamdadulislam76693 жыл бұрын
I love this explanation.
@shaheersheri14 жыл бұрын
Nice share keep it up
@navalkishore65594 жыл бұрын
int n; printf("enter an integer"); scanf("%d",n); while(n=0) { printf("enter an integer"); scanf("%d",n); } printf("you are out of loop"); when i use this code then and entered 0 then i got message "you are out of loop". and not when [while(n!=0)]
@MdKhadeerPasha-wf6lk3 жыл бұрын
Sir in example of do and while u not putted semicolon in do while loop
@francisjaranilla3335 Жыл бұрын
Hello Sir! How about you make a video about turning for loop into do while loop.. It will be very helpful. Thank you!
@ratchetbear37772 жыл бұрын
Information was clear and concise. Thanks heaps for your efforts :)
@sohailsohail91642 жыл бұрын
2:41 displayed do while loop program no semi coloum
@amberarts73563 жыл бұрын
Thank you so much this was really helpful
@dattareddy61702 жыл бұрын
I want to know what compiler you are using in your lectures
@belayfekadu Жыл бұрын
what happen if we put semi colon in after while loop
@anushabaskar3 жыл бұрын
U told that in do while loop exactly in while statement it should be ended with semicolon right??
@muhammadfauzanazima38073 жыл бұрын
What fonts did you use in this tutorial? very interesting, I want to use it too.
@AzharAli-cr2vj4 жыл бұрын
great instructor
@pakistancricket2453 жыл бұрын
It was really helpful for me sir ❣️❣️❣️
@avunooritagore60896 жыл бұрын
Sir.. I have a doubt in Second program both while and do-while is giving same output but you said if we won't place semicolon in do-while it should give an error but it is not happening here why?
@gp_sec6 жыл бұрын
He didn't run the 2nd program...
@budigesrivishnugoud68823 жыл бұрын
🤔doesn't got any error for not using semicolon in do while???
@constantinkamgo67423 жыл бұрын
good content ;deep and well structured.
@made4323 ай бұрын
What are the use cases for both of these ?
@BODDEPALLILAKSHMIVARAPRASAD Жыл бұрын
Where is Semicolon after scanf statement in WHILE LOop😅
@shubhamtiwari11902 жыл бұрын
Sir aap jo next example diye the usme while loop k baad semicolon nhi lagye he
@672_tejasdesai33 жыл бұрын
sir your explaination is very nice, thank you sir :)
@shauryasaxena52633 жыл бұрын
Tq very much sir and your method is very easy
@njabznmasikane3596 ай бұрын
Thanks so much!
@Roshankumar-hc1pp3 ай бұрын
I didn't understand last topic. When should....?
@goldenG9783 жыл бұрын
amazing, short and accurate!!!
@srta.carlota6963 жыл бұрын
Thanks! It was a fast and simple explanation to understand. Nice video ^_^
@upscallmydream3 жыл бұрын
Sir at the end you tell me the output will be the same because both the programs does same task.. but when u studied me difference between them. We used same task. But output was different.. in while loop no output but in do while loop output=0
@zaidansari35956 ай бұрын
Thnx ...very helpful ;_;
@shiv_crypto_8 ай бұрын
I guess we can do same thing with both the loops as you said about that redundancy i wrote the code without seeing the answer if i am wrong in my code please correct me but its giving output that is required //C code using loop to stop user when she/he enters ) as input #include int main() { int i = 2; while(i!=0) { printf("Enter the number you want : "); scanf("%d",&i); } printf("You entred wrong digit : "); int j = 5; do{ printf("Enter the number rather than 0 only "); scanf("%d",&j); } while(j!=0); printf("You entered worng value "); return 0; }
@shivangishukla33122 жыл бұрын
4:01 why you didn't put ; on do while loop
@madhura95104 жыл бұрын
Sir plz make vdo on difference between definition and declaration of variables in c
@heypikachu2762 жыл бұрын
Isn't this still classified as a while loop? I honestly have no idea because I use LUA and haven't learned C fully, but thought not "While true do," it's still a while loop, correct?
@ashraf68504 жыл бұрын
Do while end with semicolon
@jayapriyamoorthy74432 жыл бұрын
Python oops concepts post pannunga
@jayapriyamoorthy74432 жыл бұрын
While loop is enter loop
@CantHandle7772 жыл бұрын
isnt 0 a integer...btw nice explanation
@vilanv-a62963 жыл бұрын
so its literally another syntax to add an if statement in a loop?
@varishamalik97262 жыл бұрын
Sir you didn't put colon after while in do while loop
@asif72402 жыл бұрын
thanks!
@samararora24202 жыл бұрын
You didn't write semi colon after while in the program of do while when showing the program
@jimmymesa5 жыл бұрын
Python is born out from C. However, there is no do-while construct in Python.
@santhoshjd26734 жыл бұрын
Thank you 😊
@ahmadnaqvi20452 жыл бұрын
Why don't you have a ; after while (n !=0) in the do while loop code?
@handle_gc Жыл бұрын
Because using ; after while() will consider the end of the loop (without body) and throw error. In case of do-while it assumes while() as a part of do{}. And ; separates this complete loop body n condition from rest of the statements.
@regular49932 жыл бұрын
It can also be n>0 ryt?
@Justin-yk1jk4 жыл бұрын
do nested loop in C language please
@actionaction0072 жыл бұрын
Semi colon not used in example ? Mistake
@ruok19922 жыл бұрын
''while u r outside, buy some milk'' - he neve came back
@iltam-sumra-rashupti-elatim3 жыл бұрын
thank you indiaman
@md.mominulislam41894 жыл бұрын
Can i solve the same problem with for loop?
@abhinavkondilya94713 жыл бұрын
Your last Do - While loop shown error because the semi colon is missing
@anonymouscrawler.official Жыл бұрын
❤
@diyandassembling29073 жыл бұрын
Interesting.
@cinemacandy54963 жыл бұрын
the hindi channel should mention in title as Hindi.
@harishkumar-gg6nt3 жыл бұрын
why your codes are not working in online complier
@peravarapulalitha21054 жыл бұрын
It's good 👍
@shitikanthparida8270 Жыл бұрын
Bro You left the semi colon in the integer math in do while loop .
@jayapriyamoorthy74432 жыл бұрын
Do while is exit loop
@humaarif4375 жыл бұрын
what's the meaning of semicolon at the end of do while loop please dry run this loop
@sruthimajhi5610 Жыл бұрын
Hey can anyone clear my doubt? We need 2 variables right coz there are 2 statements for storing an integer .
@handle_gc Жыл бұрын
could you put a time stamp for much clarification for your que?