Тёмный

Functions (Solved Question 1) 

Neso Academy
Подписаться 2,7 млн
Просмотров 289 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 465   
@data.practitioner
@data.practitioner 3 года назад
Starting by incrementing from count(2) Count(2): 110110011__ itr0 Count(3): 001101100__itr1 Count(4): 000011011__itr2 Count(5): 000000110__itr3 Count(6): 000000001__itr4 Count(7): 000000000__itr5 After count(7) we get out of the loop.
@shrutipatil4252
@shrutipatil4252 3 года назад
Right!
@adarshrai5807
@adarshrai5807 2 года назад
Right !!!
@lightmani1701
@lightmani1701 2 года назад
Absolutely Perfect!
@cherryayethihan
@cherryayethihan 2 года назад
The answer is 7?
@durva2874
@durva2874 Год назад
@@cherryayethihan yah
@nareshsachin7967
@nareshsachin7967 3 года назад
lot of years im search a good tutorial for c but now i find a gold tutorial...super presentation and simple and quality examples
@lalit2926
@lalit2926 4 года назад
I am too late to watch this series but really this is best series for learning c and data structures....
@Dnsx_plus
@Dnsx_plus 4 года назад
same
@foodmonk2292
@foodmonk2292 4 года назад
it's never too late....BETTER LATE THAN NEVER.....starting to learn and progressing till this video is a great step...keep going...keep growing
@sirikisrinivasarao7994
@sirikisrinivasarao7994 4 года назад
Yes bro... I want this video playlist to come in first after search.... S
@Jkt61205
@Jkt61205 4 года назад
@@foodmonk2292 That's really an inspirational line bro
@sandippramanik5733
@sandippramanik5733 3 года назад
@@foodmonk2292 True!
@IntradayWithShahid
@IntradayWithShahid 5 лет назад
the answer is 7, as the count starts from 2 and the loop terminates after 5 iteration so 5+2=7.
@rimpinag6346
@rimpinag6346 3 года назад
But my answer is 6
@IntradayWithShahid
@IntradayWithShahid 3 года назад
@@rimpinag6346 i have already explained
@rimpinag6346
@rimpinag6346 3 года назад
@@IntradayWithShahid ok okk understand 👍 I am little bit confused
@criminalcoder6307
@criminalcoder6307 3 года назад
@@IntradayWithShahid 🤣🤣🤣
@akshyabedi4997
@akshyabedi4997 3 года назад
Smjh ni aya
@megaraina8542
@megaraina8542 3 года назад
Value of count is 7.And the loop terminates after 5 iterations. Initially the value of count is 2 and after 5 iterations it will be 5+2=7.
@shreyassakriofficial
@shreyassakriofficial 3 года назад
I have a little bit different approach. As it is a right shift that also we have to do 2 times per iteration so as discussed in previous lectures in right shift we divide no. By 2^(no. Of bits to right shift) so here no. Of bits to shift is 2 so we will divide by 2^2 i.e. by 4. So when we count the iteration along with dividing no. The loop will terminated at 5th iteration as at 5th iteration the value i.e. the no. Will be 0 after dividing. So the final answer is 5+2 = 7. i.e. count =7
@vishwajeetkumar3636
@vishwajeetkumar3636 4 года назад
For the loop to terminate :- (435/4^x) 4^x>435 => x=5. And since count is initiated with 2 , hence final o/p - 2+5 = 7.
@debjyotisarkar9578
@debjyotisarkar9578 Год назад
Someone explain this pls?
@yashbindal9443
@yashbindal9443 Год назад
let me explain u we take the value the give num and divide it by 2*2^n (first 2 is no. of swifting we are doing ,then net 2 is poissible output that is 0and1 power x which is iteration) smaller then 1 because we need to make the binary number zero which is less then 1@@debjyotisarkar9578
@dineshkiran987
@dineshkiran987 3 месяца назад
Bro explain it pls
@kishors8200
@kishors8200 4 года назад
It is really useful for my gate preparation thank you sir
@theprofessorhetsron6713
@theprofessorhetsron6713 4 года назад
The Answer is 7 Thanks sir for your effort
@Ankit-zi3yf
@Ankit-zi3yf Год назад
He should be a private tutor for c he deserves even more i prefer to watch his videos rather than other hindi programming videos
@vishalmishra9933
@vishalmishra9933 3 года назад
Thanks a lot to neso academy, For giving eacha and every concept clear as water
@Aabara_ka_dabara
@Aabara_ka_dabara Год назад
1. 435/4 = 108; count=3 2. 108/4 = 27; count=4 3. 27/4 = 6; count=5 4. 6/4 = 0; count=6 1/4=0 count=7 (final answer)
@JoyceMwaura-xq1ot
@JoyceMwaura-xq1ot 6 месяцев назад
Why did you divide by 4?
@DavidAmon-pd8up
@DavidAmon-pd8up 20 дней назад
@@JoyceMwaura-xq1ot 2 to the power of 2(incrementing to the right by 2).. = 2^2
@tulakchowdhury4906
@tulakchowdhury4906 3 года назад
7 is the value returned by the function
@mohamedkanu66
@mohamedkanu66 4 года назад
I got 7 for the count: 5 loop iterations for the shifts plus the initial 2 of count.
@shamlikayastha9765
@shamlikayastha9765 2 года назад
The answer is 7. Thanks sir for your wonderful explanation.
@Softwareengineeringdev
@Softwareengineeringdev 6 лет назад
You are very good teacher
@DeepakThakurEntrepreneur
@DeepakThakurEntrepreneur 3 года назад
Count = 2 (Initial Value) Count = 7 (Final Value) Answer is Count = 7
@aseefraza2960
@aseefraza2960 6 лет назад
loved and enjoyed a lot, eagerly waiting for the next one and much excited for data structure lectures
@ganavin3423
@ganavin3423 4 года назад
Excuse me I have a doubt about 1question that num>>=1...in this why we use =operator .... it is left shift right ..then why we use =operator.
@ganavin3423
@ganavin3423 4 года назад
@@saisumanth2289 thank u bro,now i am realised that it is a compound assignment. thank u for ur replied message.
@nforme7826
@nforme7826 4 года назад
Here num is 435 (110110011) and count=2, if we shift right the number like 001101100(3) ,here 3 after count (2 )give that, for understanding Similarly, 000011011(4) 000000110(5) 000000001(6) 000000000(7) After counting it gives 7 if we count after 2 and another simple way is 2+5=7.
@chandrakishorsingh9779
@chandrakishorsingh9779 4 года назад
The value returned by func(435) is 7. (At Iter 5 we got num=0, so 5+2=7)
@shreedharchavan7033
@shreedharchavan7033 3 года назад
I think it can be done with the shortcut formula you told in previous videos i.e. in right shift we divide the given number by 2^number
@sanjana6931
@sanjana6931 Год назад
so i ain't the only one who did it that way!
@sagarraj4521
@sagarraj4521 6 лет назад
7--hmwrk answer
@srinjaydas9144
@srinjaydas9144 3 года назад
When count = 7 num contains 0 value.So the condition became false and we came outside of the loop and return the value of count which is 7.So 7 is the right ans.
@Codality
@Codality 4 года назад
Thx Neso Academy Such a great Question as usual The answer is 7
@aravindreddy5246
@aravindreddy5246 2 года назад
a very good you tube channel to learn c programming.
@RohitSharma-oy7id
@RohitSharma-oy7id 5 лет назад
count = 7.
@NikhilKumar-ev2ml
@NikhilKumar-ev2ml 3 года назад
the value returned by func(435) is 7
@ArunSingh-lb7qy
@ArunSingh-lb7qy 5 лет назад
7. Because, now every time >> shift num by 2 bits,so num becomes num/4 each time, and 5 time loop, will make count =2+5=7.
@adityaband6919
@adityaband6919 5 лет назад
now likes are also 7
@gaash313
@gaash313 5 лет назад
@@adityaband6919 i broke it dear now it is 8 ....hahahah
@gaash313
@gaash313 5 лет назад
but what if the count value was intialised with 0. ?
@adityaband6919
@adityaband6919 5 лет назад
4
@adityaband6919
@adityaband6919 5 лет назад
5
@tehuanmelo
@tehuanmelo 2 года назад
The variable count will be iterated five times, so the final value of count is 7. Best content ever!!!!
@sharvilsopal416
@sharvilsopal416 3 года назад
Thank you for this series. It really helped me a lot.
@sharvilsopal416
@sharvilsopal416 3 года назад
Answer is 7.
@shreenathkv3879
@shreenathkv3879 3 года назад
@@sharvilsopal416 ya thanks
@kartikrameshchavan6662
@kartikrameshchavan6662 2 года назад
7 is the answer. Thanks Sir
@rakeshkumarsm6872
@rakeshkumarsm6872 5 лет назад
SIR when you will upload the lecturers on datastructures.
@ShivamKumar-ie1je
@ShivamKumar-ie1je 3 года назад
Ans is 7. #include int fun(int a){ int count=2; while(a){ count++; a>>=2; } return count; } int main(){ int a; a=435; fun(a); printf("the value of a: %d ",fun(a)); return 0; }
@mahalingpreethi1021
@mahalingpreethi1021 3 года назад
The value returned by func(435) is 7 as count value is 7
@lordjadn
@lordjadn 5 месяцев назад
Quick question on the first task, how is the count = 9 instead of 10, when it's being incremented before the shift operation? while(num) { count++; num>>= 2; }
@gauravdev5884
@gauravdev5884 2 года назад
The answer to the homework is 7. But how to remember the bit representation of such a large number like 435. Do the question contains the bitwise representation of the given number?
@arinjeetbairagi6704
@arinjeetbairagi6704 5 месяцев назад
435/2² =435/4 = 108 itr 1 Same as it's goes for 5 times untill it reached 0 The count strats from 2 So the final ans is 5+2=7
@jk15NT
@jk15NT 6 лет назад
Sir your videos are tha best plzz upload more
@Rest_leave
@Rest_leave 2 года назад
The answer is 8 because after integer to binary conversation we will get 11 digits number, So in 5 iterations it will remove 10 digits from no. Then 1 digit will remain for that it will iterate one more time then count could be 6 since count start from 2 so, the answer will 8.
@ritikpatel7918
@ritikpatel7918 3 года назад
There will be 5 iteration in this loop. Th value of Count will become 2+5 = 7.
@hhcdghjjgsdrt235
@hhcdghjjgsdrt235 2 года назад
ah I did this alone. Having a civil engineering background I think Ive got so far. Thank you Neso Academy.
@RohitSaini-pk9ir
@RohitSaini-pk9ir 5 лет назад
7 in answer bez we shift count 5 times so 2+5 = 7.
@Ronitbaniya
@Ronitbaniya 3 года назад
Hello sir ia am a starter of diploma in engineering college and i am felling greate to learn here Bither way the answer is 7.
@vesangisaichaitanya7447
@vesangisaichaitanya7447 4 года назад
Sir the you provided here is extremely beautiful in every way and can you please provide c++ oops concept
@abpokeunite3463
@abpokeunite3463 Год назад
thanks a lot sir for your video lectures they are really helpfull to us thankyou very much sir
@bjp_zero
@bjp_zero 8 месяцев назад
For left shift multiplication and for right shift division
@pankajkumarbarman765
@pankajkumarbarman765 5 лет назад
Ans in 7 sir bcz 435 in binary 110110011 and given that shifting by 2 when count is 2 the while loop will terminate after 5th iteration (the value of num is then num =000000000) and the Value of count returns is 5+2=7 ans..
@khatariinsaan5284
@khatariinsaan5284 3 года назад
THank you so much
@vijayamoka3842
@vijayamoka3842 3 года назад
could u plz tell me how it will be 7 again?
@millenmarbun24
@millenmarbun24 5 лет назад
how is the loop argument >> while(num) means while num is not equal to zero?
@nishaverma7788
@nishaverma7788 3 года назад
As regarding condition of while loop we take them as true or false and all numbers other than zero are considered as true and 0 is considered as false...
@pepepacheco6199
@pepepacheco6199 3 года назад
wouldn´t be better to write.....while(num ¡=0) instead of just while(num)??....thank you for your reply
@imharishsambasivam
@imharishsambasivam 5 лет назад
num / 2 power 1 .since shify by 1..
@sasidharan4460
@sasidharan4460 2 года назад
Instead of doing it BIT by BIT, We can just use this this rule, We know that when we right shift a number by any number, Say 435>>1 = 217, which we can calculate by 435/2^1, By doing it again and again in calculator until it reaches 0, we can calculate the number of iterations to make that value to 0, we can find the answer I guess ?. Correct me If I am wrong peace ✌️.
@AtaurRahman-ft2nh
@AtaurRahman-ft2nh 5 лет назад
Value returned by func(435)=7
@ChintanDhokai
@ChintanDhokai 4 года назад
435= 110110011 c=2 //right shift 2 num=001101100 c=3 num= 000011011 c=4 num=000000110 c=5 num=000000001 c=6 num=000000000 c=7 Ans= 7
@marvelshorts2.o337
@marvelshorts2.o337 Год назад
nice explaination sir
@avunooritagore6089
@avunooritagore6089 6 лет назад
7
@teegalashreyaamadhury
@teegalashreyaamadhury 3 месяца назад
the ans is 7 iterations if count is 2 as it right shifted by 2
@APstudent-y6s
@APstudent-y6s 8 месяцев назад
4:50 thnx neso
@maheshm1144
@maheshm1144 3 года назад
answer is 7 thanks for explaining
@kondababudittakavi5288
@kondababudittakavi5288 5 лет назад
In 5th iteration num become 0 and the function returns the count value 7 so the op is 7
@Geff_115
@Geff_115 11 месяцев назад
after count(6), value returned is 4
@HelloWorld40408
@HelloWorld40408 Год назад
Thank You SIr
@khannasir1057
@khannasir1057 3 года назад
sir made a videos on c++ i really like your's c videos
@jebuelspat213
@jebuelspat213 5 лет назад
Ans : 5
@true4189
@true4189 4 года назад
Thank u
@ajmalkhaniit
@ajmalkhaniit 4 года назад
In the fifth iteration num becomes all zeros so count is 7
@badavathjaipal7027
@badavathjaipal7027 2 года назад
The func(435)=7;after 7th count loop can't be terminated...
@RameshKumar-yk4kl
@RameshKumar-yk4kl 5 лет назад
435>>=2 COUNT IS 7. Thank you sir.
@JaiShriRam9251
@JaiShriRam9251 4 года назад
Absolutely=7
@dileepcheekala2617
@dileepcheekala2617 2 года назад
Thank you 💖😌💖 sir
@najminakter2773
@najminakter2773 3 месяца назад
this program counted 2bits then running count value 5 and initial value 2 . then finally output is 2+5= 7 .
@raghunathshelke6170
@raghunathshelke6170 6 лет назад
7 is answer of 2 nd eg
@Deepthi_Chowdary5321
@Deepthi_Chowdary5321 Год назад
Ans:7 I got it......❤❤
@PriyankaGupta-gn7ve
@PriyankaGupta-gn7ve 2 года назад
C(2):110110011 C(3):001101100 C(4):000011011 C(5):000000110 C(6):000000001 C(7):000000000 Return value will be 7
@_dipakwagh_
@_dipakwagh_ 2 года назад
after count=7,while loop condition becomes false
@rahultheytv5347
@rahultheytv5347 5 лет назад
1|10|11|00|11 , count =2+5=7
@ganavin3423
@ganavin3423 4 года назад
What is the need of usig = operator in num>>=1.
@leoengy
@leoengy 3 года назад
The answer for the second case would be 5 (iterations) if I am not mistaken.
@aman_gupta9855
@aman_gupta9855 4 года назад
Ans is 7 sir
@Krishna_Keshri
@Krishna_Keshri 4 года назад
Count=2+5; Count=7;
@bjp_zero
@bjp_zero 8 месяцев назад
for hw, divide by 4,So answer become 7
@ajaykumar5873
@ajaykumar5873 5 лет назад
The answer comes To be 7. Is it right?
@aberateklehaimanot9804
@aberateklehaimanot9804 3 года назад
thanks buddy
@simasaha81
@simasaha81 3 года назад
7 will be the answer. God, I am getting correct answers. So, enough for today going to sleep and have a good dream.
@Bstarinfo
@Bstarinfo 5 лет назад
7 is the correct answer of the homework problem
@virtualcoding8629
@virtualcoding8629 3 года назад
Output:7
@prajapati_23
@prajapati_23 6 месяцев назад
Answer 1st iteration 00110110 2nd iteration 000011011 3rd iteration 000000110 4th iteration 000000001 4th iteration 000000000 Finally count -7❤
@punitkumargupta5461
@punitkumargupta5461 4 года назад
Cont = 2+5=7
@compilerrun5516
@compilerrun5516 4 года назад
This question is all about conversion
@bjp_zero
@bjp_zero 8 месяцев назад
Just devide 435/2... keep division until the value become 0
@ganavin3423
@ganavin3423 4 года назад
We hitted the like button....and subscribed also ......but ur not solving anyone's doubt......please solve ours doubt...I request u sir.. why we use =operator in num>>=1...
@TheSabarno
@TheSabarno Год назад
7 There there will be 5 iterations until while loop turns false.
@arjyapaul2695
@arjyapaul2695 4 года назад
is this bitwise operator problem?
@VikramKumar-rj6pu
@VikramKumar-rj6pu 3 года назад
Ans 7
@himanshugupta7947
@himanshugupta7947 5 лет назад
Homework answer.... 7
@shubhamkeshri1184
@shubhamkeshri1184 4 года назад
Please sir data structure pe or video upload kro....ab bas aap hi last hope ho mere liye...nd thanks for this video
@deepkumarumradiya9791
@deepkumarumradiya9791 4 года назад
Answer is 7
@ganavin3423
@ganavin3423 4 года назад
Anything is wrong in my question.if you won't reply me then what is the need of doing sessions .... it's not cleared for me .... please help me sir🙏🙏🙏🙏.... Why we use=operator in num>>=1.
@39debolinadhara67
@39debolinadhara67 3 года назад
num>>=1 means num = num>>1
@Rest_leave
@Rest_leave 4 года назад
Ans. Is 7
@mdadilmasood4849
@mdadilmasood4849 3 года назад
the OUTPUT will be 7
@deepaksaxena2182
@deepaksaxena2182 4 года назад
Ans is 7..5+2..
Далее
Functions (Solved Question 2)
7:03
Просмотров 210 тыс.
Recursion in C
11:12
Просмотров 932 тыс.
skibidi toilet 77 (part 4)
05:20
Просмотров 13 млн
patterns in C - Tips and Tricks
1:18:42
Просмотров 816 тыс.
Call By Value & Call By Reference in C
8:34
Просмотров 1,3 млн
How to solve any Star Pattern Program
18:47
Просмотров 1,2 млн
#15  C Functions | C Programming for Beginners
17:21
Просмотров 219 тыс.
FIRST() and FOLLOW() Functions
11:53
Просмотров 290 тыс.
The Bounded Buffer Problem
15:48
Просмотров 293 тыс.