--a*(5+b)/2-c++*b --0*(5+1)/2-(-1)++*1 Firstly we evaluated which is written in bracket --0*6/2-(-1)++*1 Now we evaluate postfix increment op --0*6/2+1*1 We write +1 bcz in postfix firsly value assigned then value incremented After postfix increment we evaluate prefix decrement -1*6/2+1*1 We know that * and / has same precidence and associativity is from left to right -6/2+1*1 -3+1*1 We know that +has lower precidence than * then * evaluated first -3+1 =-2 Hence answer is -2
@acroshubham Жыл бұрын
For me it's the ever most helpful comment, that I ever read on this earth. Ya, there are some gems on earth, in which you are the one. Smile because you're unique. Thanks for helping me out to understand it in form of a comment 😊
@aakashyericharla8668 Жыл бұрын
can you explain the post fix increment. -1++ is 0 right?
@shivangikumari2231 Жыл бұрын
@@aakashyericharla8668 no this is not right bcz in postfix firstly we put value then incremented That means (-1)++=-1
@kkkkkkk754 Жыл бұрын
Hi, can u explain what is post increment and dercrement after the step of 5+1 pls. I am school student.. I will be grateful
@shivangikumari2231 Жыл бұрын
@@kkkkkkk754 in post increment we firstly assigned the value then incremented. Eg. int a=2; printf("a=%d",a++); It gives output a=2 then a becomes 3. In post decrement we firstly assigned the value then it is decremented . Eg. int a=2; printf("a=%d",a- -); It gives you the output a=2 then a becomes 1. Hints:- Incremented means plus 1 Decremented mean minus 1
Shortcut to remember the operator precedence table in C… Use PUMA' S REBL TAC. ( spell "REBL" as if "REBEL"). (Note: all operators with associativity not specified is left to right). P - Primary U - Unary M - Multiplicative A - Additive S- Shift R- Relational E- Equality B- BitWise ( & > ^ > |) L- Logical ( logical && > logical ||) and the last three operators are T- Ternary A- Assignment C- Comma If you need a shortcut for Assosiativity then "AUTo rides in the right side", meaning Assignment, Unary and Ternary operators are Right to Left, O is added for completion)
@gsharada2910 Жыл бұрын
Super bro no need to see video
@vaishnavinalabolu9603 Жыл бұрын
kis channel se padthe ho
@mugdhashrivastava2 ай бұрын
thanks
@aayushthakur61593 жыл бұрын
Q . --a * (5 + b) / 2 - c++ * b given a = 0, b = 1, c = -1; ans = -2 explaination- firsty bracket will be evaluated so it will give 6 now evaluate --a, it will give -1 since we are pre decrementing 0 now, -1*6 = -6 now -6/2=-3 then -3 - (-1)*b(due to post fix the value of c will remain same ) will give -3 +1*1(since b is given as 1) hence -3+1=-2 ans
@saikrishna84313 жыл бұрын
After brackets c++ na postfix increment has higher precendence that. Prefix
@sentongohamza79363 жыл бұрын
Thnx for ur gd expln abt the c++
@rutujajadhav17823 жыл бұрын
Wrong ans
@SchooloDoodlo3 жыл бұрын
He is right you can compile it
@lyricist38453 жыл бұрын
@@rutujajadhav1782 I got -3? is it correct
@susova2432 Жыл бұрын
--a will decrement the value of a by 1 and return the new value (-1). 5+b will add 5 to the value of b (which is 1) and return 6. --a*(5+b) will multiply the result of step 2 by the result of step 1, which gives -6. /2 will divide the result of step 3 by 2, which gives -3. c++ will return the current value of c (-1) and then increment it by 1 (to become 0). c++*b will multiply the result of step 5 by the current value of b (which is 1), which gives 0. -3-0 will subtract the result of step 6 from the result of step 4, which gives -3. Therefore, the output of the expression --a*(5+b)/2-c++*b will be -3.
@ElectricalsSolutions Жыл бұрын
but -2 is given by computer
@sudheerkimidi Жыл бұрын
@@ElectricalsSolutions -3+1 will become -2
@manojess Жыл бұрын
Wrong
@manojess Жыл бұрын
C++ means post increment so value of c used is -1 but in output in you print c you will get zero. In program c=-1 will be used. Now you will get -2 as the answer.
@nithiya84183 жыл бұрын
Mam ur DS playlist really helped me a lot for exam prep... please make a playlist for Computer architecture also mam... the subject sounds so vague pl help mam... 🙏🙂
@chandrasekharnatukula6262 Жыл бұрын
👍
@herteert299 Жыл бұрын
Your work is awesome Mama. Your courses of the C language are the best I found on the internet.
@Mister.G1812 ай бұрын
--a*(5+b)/2-c++*b here, a=0, b=1, c=-1 --0*(5+1)/2-(-1)++*1 brackets, postfix have the same precedence(highest), therefore we have to go from left to right --0*6/2+1*1 now the prefix has the highest precedence in the above expression, -1*6/2+1*1 now * / have the highest precedence in the above expression, to break the tie we from left to right, -3+1 now + has has the highest precedence in the above expression, -2 We have the values of the variables as, a=-1, b=1, c=0
@hulkcochulk64862 жыл бұрын
int a=0,b=1,c=-1; - -a * (5+b)/2 - c+ + * b.................. ['/ ' is higher precedence than '*'] -1 * 3 - -1 * 1.......................... [value of a will increment first , c is now incremented to 0{-1+1=0}] -3 - -1..................['*' have higher precedence value than '-'] -3 + 1 = -2 ( output)
@Dr._Aniekan_udo2 жыл бұрын
Ans = -2 - -a * (5+b) / 2 - c++ * b - -a * 6 / 2 - - 1 * b (#(),++,#) - 1 * 6 / 2 +1 * b (#- -, -,# ) - 3 + 1 (#* ,/ ,*#) - 2 (#+#) Operation done on the previous line is commented with # inside the bracket in the new line, in other of operation precedence and separate by non-computing commas. I didn’t use compiler anyways, but you are free to point out mistakes if found😅
@omarfaruque10952 жыл бұрын
You didn't increment the value of c by 1.
@Dr._Aniekan_udo2 жыл бұрын
@@omarfaruque1095 it was a post increment, so c was evaluated before being incremented, as such it remain as -1 as shown in the second line
@adedejiafeez12382 жыл бұрын
@@Dr._Aniekan_udo apt. Followed the same reasoning and compiled to verify my answer
@kennedychukwu41522 жыл бұрын
I think it's after the program runs for the first time, then when it runs the second time it will increment to 1 because it's a postfix. That's how the postfix program runs. If it was a prefix it will increment from 0 to 1 the first time it runs.
@Narratesmart Жыл бұрын
Thank you sir
@sumitkhursange26733 жыл бұрын
Mam your videos is easily understandable for me on KZbin platform... Thank you mam for this course🙏
@emiliarose19804 ай бұрын
Big thanks to you ma'am , what a smoothness and how u can transmit ur knowledge is just amazing 👏 👌 ❤
@tusharsonawane3530 Жыл бұрын
Excellent teaching mam , no words for your teaching
@tps84702 жыл бұрын
Ans is -2 Thanks a lot Mam
@ElectricalsSolutions Жыл бұрын
how i couldn't got it
@saibalam78523 жыл бұрын
Mam ur teaching is marvelous this is what a beginner expects
@yeshwanthrajsp58763 жыл бұрын
teaching "extraordinary, fanstatic and mind blowing mam salute mam😇"
@whathuh6965 Жыл бұрын
You're really good at explaining things clearly. Good job.
@Pramiti_Choudhury Жыл бұрын
do we have to learn this???to solve, but how will i learn such a big table? any short trick? like bodmas or something?
@khushikumari-fun Жыл бұрын
-3 will be correct answer.. --a * (5 + b) / 2 - c++ * b given a = 0, b = 1, c = -1; --a * (5 + b) / 2 - c++ * b -1*(5+1)/2-0*1 (--a becomes -1,The value of a is updated to -1 becuase its a prefix dcrement and c is postfix increment so it will be update -1 to 0). -1*6/2-0*1 -1*6/2-0 -6/2-0 -3 ans................
@TechR2545S Жыл бұрын
Correct
@MINHAJ_MJ2 жыл бұрын
Compiler Answer : -2 but what i understood from your lecture: int a=0,b=1,c=-1; int k= --a *(5+b)/2-c++*b; --a *6/2-c++*b --a *6/2-0*b -1 *6/2-0*b -6/2-0*1 -3-0*1 -3-0 -3 tell me where i am wrong??
@yashkumar-lg1jq2 жыл бұрын
You didn't take c++=-1
@ankitrawat9782 жыл бұрын
@@yashkumar-lg1jq why? c is already -1 .and after c++ it becomes 0
@yashkumar-lg1jq2 жыл бұрын
@@ankitrawat978 bhai post increment hai
@kannakavyareddy66852 жыл бұрын
Yaa i got the same answer
@sanatanmahato73412 жыл бұрын
-2 is my final answer a= -1 b= 1 c= 0 If it is right please let me know jenny mam
@BITPrateektrivedi3 жыл бұрын
Waiting from last 5 days.. Happy to see you in my notification 🙂🙂
@sagar12163 жыл бұрын
Videos are good as talking about the explanation, but I am wishing project based tutorial as these videos totally like as some online Computer Engineering Quick Guides. If you could do it I would be very thankful to you ,MAM!, as I am just in 9th. Please..
@chandrashekarr19773 жыл бұрын
Nice one. Thank you. This part need more clarification and workouts as most of the entrance exams have bunch of questions from this area. To my knowledge, none of the books in market covering this area fully. There is always a grey area where people get confusions. If possible, please comeup with more videos with more sample questions from placement question papers and show with step by step explanation in detail. Thanks once again.
@Ganesh222 Жыл бұрын
You are a very experienced and skill in teaching mam .... really
@walkwithme_P623 жыл бұрын
a=o b=1 c=-1 --a*(5+b)/2-c++*b =0*6/2-c++*b =0*6/2-2*b =0-2 =-2 Ans is -2 Thanks ma'am
@anjanhalder71642 жыл бұрын
Post inc. Will increase value after that statement... That's why -3
@VishalAwati182 жыл бұрын
@@anjanhalder7164 can u plz elaborate? My output is just showing -2
@anjanhalder71642 жыл бұрын
Ans is -2. I was wrong.
@farzanaashraf81362 жыл бұрын
@Prajwal @Anjan Halder @VISHAL AWATI Please tell me about the --a when the a is an integer and it's value can be -1 after the --a?🤔
@Rajendra_kumar39 Жыл бұрын
Wrong
@HariomSingh-nc6uh2 жыл бұрын
Maam u r soo cute And through your teaching pattern I'll learn more and more.... U r amazing😍 Love from FoET lucknow CSE(AI). ❤
@girishkulkarni3537 Жыл бұрын
I have seen c programming topic video. Amazing presentation.
@memcraft_25113 жыл бұрын
Thank you so much mam aap kitna hard work karti h mam
@hiriharanvm55686 ай бұрын
int main() { int a = 0, b = 1, c = -1,res; res = --a*(5+b)/2-c++*b; printf("%d",res); return 0; } ans is -2
@chaitanyapaidi73963 жыл бұрын
I just watched your previous videos of many months before and you know what you have become chubby and cute 😍😍❤️.....love from South India ❤️❤️🔥
@adityaprakash62482 жыл бұрын
I could not solve why when a=0, b=1, c=-1 why --a*(5+b)--c++*b comes out to be -2
@hadieudonne4333 жыл бұрын
Welcome Back and HnewY 2021 Lecturer Jenny, wish you higher advancement in this year and I promise you to be a good programer because of you. Step by step any thing is possible
@hadieudonne4333 жыл бұрын
Thank you so to press like on my comment, now I want to invite you if possible to press follow on my instagram which is instagram.com/hadieudonne43 🤦🤦🤦🙏
@prakashvenkat76303 жыл бұрын
kzbin.info/www/bejne/p3qVaph3ncl9f8U
@tellalavanya3819 Жыл бұрын
answer is -2 mam for the last expression
@shrur35272 жыл бұрын
dear mam thank you will be very less for your videos , praying for all happiness n success to u n to ur family , i m benefited a lot by your videos , you are an excellent teacher
@archittiwarii3 жыл бұрын
Mam thanks 😊 . I m beginner 🔰 mam give a video how to start
@karthikpendem708527 күн бұрын
a=0; b=1; c= -1 --a×(5+b)/2 - c++ ×b Solve the above question according to C programming The answer is -2
@maryannemuthoni5388 Жыл бұрын
int a=0, b=1, c= -1; --a * (5+b)/2-c++*b Start with brackets and postfix --a * 6/2 - -1*b Move to prefix -1 * 6/2 - -1*b Move to multiplication and division -3 - -1 -3 + 1 Answer is -2
@freakraajpubg26263 жыл бұрын
Watched your whole ds algo videos... Really helpful for me.. Keep making such videos🙏
@brindhavenugopal43953 жыл бұрын
12.30-( answer is -2 mam)
@sumitbadola29763 жыл бұрын
Can u explain?
@shacks053 жыл бұрын
I kindly Request . To Pls Make Videos on Python As soon as possible mam ❤️ . Because we are Addicted to u 🙏☺️
@manvendra911023 жыл бұрын
Best teacher ever
@d.shabanaz3373 жыл бұрын
Sister plz Jarvis Al tell us how to do as your teaching is very understandable and interesting and easy to learn
@shivamsnehi61303 жыл бұрын
🤣🤣
@amankumarsingh49242 жыл бұрын
Mam aap English kitna simple bolte ho 👌👌🤗🤗
@nasirrashid78983 жыл бұрын
I usually watch your videos they so well and I like them. thanks so much. I would ask you do you know anyone who would teach me data structure and java programming. I'm going to pay for the service.
@chinnulohithh18872 жыл бұрын
Mam can u give a more clarity about postfix and prefix with an example
@musiclovers117062 ай бұрын
Mam u r so pretty..❤ and a good teacher also..😊
@sanusain49893 жыл бұрын
Mam discuss about Python course step by step please.....🙏🙏🙏🙏🙏
@kalisthamary19194 ай бұрын
Very use ful I need online ' c 'course
@kalisthamary19194 ай бұрын
How run the c program in system
@RaniChoramale-e5w10 ай бұрын
a=0 b=1 c=-1 --a*(5+b)/2-c++*b ans=0 I dont no answer is correct . jeeny mam please the separate voide
@priyanshunandan96483 жыл бұрын
Great Guide ma'am Keep Spreading knowledge 🥰
@MathsCuberАй бұрын
mam what about the precedence of this expression? int a=5,b=4,c; c=++a||++b; printf("%d %d %d",a,b,c); i get the answer as 6,4,1?? Then why precedence is not followed??
@surendrapuppala16073 жыл бұрын
Best teacher i have ever seen
@handekarilingojivarasaikri7823 жыл бұрын
--a * (5+b)/2 - c++ * b Value will be -2
@abhirajvv79943 жыл бұрын
How please explain
@learncseasily33853 жыл бұрын
Areh i compile this code in my laptop it is coming as 1 ..i didnt understood how 1 is coming
@handekarilingojivarasaikri7823 жыл бұрын
@@learncseasily3385 Its -2 not 1. You might have compiled it wrongly.
@learncseasily33853 жыл бұрын
@@handekarilingojivarasaikri782 yes yes i got it by mistakely i have writen -a instead of - - a 😅
@prakashvenkat76303 жыл бұрын
kzbin.info/www/bejne/p3qVaph3ncl9f8U
@TheExpeditionMindset3 жыл бұрын
so basically we check the associativity (if of the same priority) from the expression
@adarshsensingh Жыл бұрын
Mam how to decide the step is L to R, or R to L if both associativity is involved in ques
@nukavarapusrikrishna7142 ай бұрын
Tq mam clearly understood 😊
@xiiscb-42subhalakshmisarka41 Жыл бұрын
Am getting -3 as the ans
@devilaj10213 жыл бұрын
Mam please check priority of postfix (++ and --) is left to right or right to left?????
@farzanaashraf81362 жыл бұрын
Left to Right
@prathamshirke74503 жыл бұрын
Mam add more languages like C++ and JAVA please
@caymannvelingkar73693 жыл бұрын
Is FINAL answer -3?
@1shAggarwal2 жыл бұрын
Mine is -1
@dharaneeshwaranr35912 жыл бұрын
Super bro
@shivatapasya19102 жыл бұрын
Bro explanation pls ?
@Abraham332862 жыл бұрын
-3
@bswetha162 жыл бұрын
-3 ans
@syedalifathimaa96183 жыл бұрын
output=> a has -1 b has 1 c has 0 result has -2
@ramakrishnakota75232 жыл бұрын
Hii
@ramakrishnakota75232 жыл бұрын
No we get c=1
@TUCSARVINDKUMARS3 жыл бұрын
I was learning from u r vedios only mama
@prakashvenkat76303 жыл бұрын
kzbin.info/www/bejne/p3qVaph3ncl9f8U
@Kulgt3 жыл бұрын
Happy New Year Madam G.. Thanks Jii
@user-kb9tz7pp9y3 жыл бұрын
Pls post the lectures in bulk!!!!if possible!!and u r the best after shukla sir!!
C has postfix increment then y it still be -1, the value must change to 0 I guess..pls clarify
@charanp9703 жыл бұрын
@@madhukasturi9953 yeah I think ansr is -4
@prathamshirke74503 жыл бұрын
Commenting uh first because in all crowd I get vanished and ignored and always I praise uh but I get camouflaged
@dharanidharani2496 Жыл бұрын
Mam the final answer is -2
@karthickambrish3 жыл бұрын
Awesome sister.... After C language kindly update a Playlist on oops based language C++ that would be more helpful sister... Thank you..
@sistlachaitanya12223 жыл бұрын
Hatsoff for ur hardworking.
@yogasankar20323 жыл бұрын
Madam please upload solving towers of honoi problem in data structures
@Rockyyyyyyy524 Жыл бұрын
Super teaching mam
@prakhar3813 жыл бұрын
Thankyou very much❤️
@farhanpathan4167 Жыл бұрын
How can we understand between uneary + - and binary + - how can we find difference
@CEIT-RANJITHR3 жыл бұрын
9*6/2+1=28
@MahirRashid-ih1nz2 жыл бұрын
thanx you are great well madam.....
@deeprabasak3455 ай бұрын
-2 is ans ....checked in ide
@jackbhai-j8u Жыл бұрын
Mam please discuss more examples on this topic 🙏🏻
@granderuhu4 ай бұрын
Anybody has a good example for that postfix operators have higher precedence than prefix operators which would give wrong result when postfix and prefix is thought as they have same precedence?
@036rahulmishra93 жыл бұрын
Nice maam ur inspiration for me
@anjanhalder71642 жыл бұрын
What is the output? Mine is -3
@ayushibawari2 жыл бұрын
yup
@sahilyadav21462 жыл бұрын
-2 is the output
@mani68962 жыл бұрын
@@sahilyadav2146 is that correct
@sahilyadav21462 жыл бұрын
@@mani6896 yes
@pragathi0682 жыл бұрын
I too got-3👍👍
@hardik89743 жыл бұрын
Ans is -2.
@CitizenWarwick Жыл бұрын
Hey Jenny did you make a video how to deal with functions? Thanks!
@SahasraMuthyam4 ай бұрын
What is the difference between uniary + and binary +
@subhashreeswain13 жыл бұрын
Answer will be -2 Mam plz reply me wheather it is right or wrong
@radhagoyal36063 жыл бұрын
I got same ans
@anjanhalder71643 жыл бұрын
-3
@Vanisingh033 жыл бұрын
Thanks a lot ma'am 😍😍😇😇
@saikiranreddy81353 жыл бұрын
Mam do videos on python programming language
@laksh2626 Жыл бұрын
a-b/c(c*d$e) mam how to solve this question 🤔 does * and $ have same precedence