The way you're teaching, presenting problems to us, and claiming for answers in the comment box is quite convenient to grasp the concepts and make us feel the classroom environment.
Output will be 1 and b will be 7...Also you are best Ma'am..Today is my exam and I was so tense now my mood is good too after watching your video...Your teaching is best☺
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
No brother the precedence changes and 0 && b++ will be evaluated first and then 1 || (value of 0 && b++) …so output will be 1 but again b value will not be affected
in the last case after adding && b++ and printing b only gives value of 6 so that means it doesnt execute the expression && b++ as per left presidency and OR operator before on left
@@SaraswotiKhadka at last mam changed the question i.e ( a&b && b+1 || 0 || b++) first mam explain with this example later, The question is ( a&b && b+1 || 0 && b++) bitwise & has higher precedence so, now the expression on solving ( 2 & 7 || 0 && b++) so, 2&7 = 1 So expression changes as follows (1 || 0 && b++) here && has higher precedence and also b is updated to 7 here as we used b++ in our expression. so, 0 && b++ is done first i.e 0&&6 output is 0, now ( 1 || (0 && 6)) BECOME (1 || 0) Finally output of this expression is one bcoz of logical or.
@@hariparuchuru3858 bro, in logical and (&&) , if 0 is one of the operand then we don't fetch the second operand and the result is 0 , as in this 0 && 6 output is 0 and we don't consider the second operand So b++ value remains same i.e. 6
Technically you r correct and you are technically sound. Don't get nervous or fast while teaching. But teaching is good. But you can make it better because you are technically sound.
Good day Ma'am. 2 years later and your course is still very much relevant! Thank you for what you do. So I have a question, when performing certain operations on while working with binary in jpeg mode, we usually have to check if the first four digits of the 4th byte of a specific amount of data is a certain value. Here, we use the bitwise & operator. My question is, when checking to see if the first four values are similar to 0xe0, why do we use the & operator with 0xf0 on one side and 0xe0 on the other? Why don't we have 0xe0 on both sides? An example code is as shown below: if (buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff && (buffer[3] & 0xf0) == 0xe0) Look forward to hearing from you soon ma.
@@AnkitKumar-ud4vt @Neeraja Neeraja Because at second last evaluation of expression, first && operator will be evaluated then || operator will be evaluated and there is 0 as first operand in && operator then there is no need to check for the second operand and consequently b value will not be incremented. I hope you will get it, what I tried to explain. 🙂
Thank you for teaching us in an excellent manner you are extremely better than my college faculty they don't taught me all this so that I'm stuck with lot of doubts So because of you I'm able to i understand everything thank a lot mam 💟💟💟💟💟💟💟💟💟💟💟💟💟
mam in the logical AND(&&) operator the final output will be 1 and 7 right. I didn't understood how did we got 2 there. Can you please clear this doubt mam?
hi mam, nice explanation , in this video , which first prior , & ,+ , pervious video you explain high priorty each by binary.but while combination how we can identity which first for example & ,+ .
b=6 Even if && is there, it didn't get incremented while executing #include int main() { int a=10,b=6,c; c=a&b&&b+1||0&&b++; printf("%d %d %d",a,b,c); return 0; } output==> 10 6 1
@@syedalifathimaa9618 because logical && operator precident higher then logic ll operator C = a & b && b+1 || 0 && b++; C = 10 & 6 && 6+1 || 0 && b++; C = 10 & 6 && 7 || 0 && b++; C = 10 & 6 = 2 && 7 || 0 && b++; C = 2 && 7 = 1 || 0 && b++; C = 1 || 0 && b++;(logical && operator incounter 0, it will not move on b++ , it give ans 0 and b++ will not exicuted. C = 1 || 0 = 1 I hope my explanation you will understand 😊
I didn't understood that why the output of b would be 6 and not 7, as precedence of increment operator is more than other operators, so logically the increment operator should be executed first and the value of b must be 7 in both && case and || case.
@@vrajalingam3487 I got my answer. See precedence is checked only when a operant(or any number) has more than one operator, and not checked at first for whole statement. And in case of || only first part is checked and if that part returns true then other part is not check., same in case of &&, if first part returns false, other part is not checked.
@@lokesh6828bro l also know that even everyone but here the main problem is when we r doin b+1 i.e 6+1=7, then value of b is updated here only & in b++ we have to consider 7 & not 6 (coz the value of b is updated in the memory after doing b+1 ) i.e why when we'll print 'b' we should get 7 but still we r getting 6 . How's that possible, l can't understand
@@Helly04 Because b++ and b+1 is not the same thing, in case of b+1 the value doesn't change in the memory it just changes where it is assigned to. So if b=6, c=b+1 then c will become 7 but b will remain 6 in the question, && has higher precedence so, after initial solving the question comes to this, 1 || 0 && 6, here && will be evaluated first due to higher precedence, in logical and if first operand is 0, second one isn't evaluated final output becomes 0. So now it is 1||0, in logical or if first operand is 1, final output becomes 1, second operand isn't evaluated, so the second operand b++ was never checked in any of the steps, that's why the value of b remains 6 and the final result is 1
What mam told at the end, if we use logical AND then also the output will be 1 as 1 && 6 is 1 and since the first operand is true which is 1. so will b = 6 or 7? in next printf statement. Can u please explain?
NOTE: Precedence will come into picture only if expressions will be evaluated. In case of && or || its possible that some expressions may not be evaluated at all because we obtain 0 or 1 respectively. Hence, no matter how much higher precedence operators are there in those expressions, those expressions would never be evaluated
The way you're teaching, presenting problems to us, and claiming for answers in the comment box is quite convenient to grasp the concepts and make us feel the classroom environment.
I can proudly say that this mam is the reason why i scored good marks while i was doing my engineering. Lots of love from nepal ❤️🙏
Output will be 1 and b will be 7...Also you are best Ma'am..Today is my exam and I was so tense now my mood is good too after watching your video...Your teaching is best☺
It very good lecturing about general concept of C++ programming and she continuous this the work teacher.
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
In second the output will be 1 in(&&)case
And b++ will print 7
No brother the precedence changes and 0 && b++ will be evaluated first and then 1 || (value of 0 && b++) …so output will be 1 but again b value will not be affected
in the last case after adding && b++ and printing b only gives value of 6 so that means it doesnt execute the expression && b++ as per left presidency and OR operator before on left
Thank you mamm for the wonderful explanation. a&b = 2, a | b = 14, a ^ b = 12 and and the last is 1
Mam the way you teach to us is the best way and we understand and resolve our problems easily 👍👍
Far better than my college professor..she is just a noob in front of you..😂
Nice session Ma'am
My doubts are always cleared by watching your session.
Thanks a lot for this awesome session.
13:07 output of first three statement is
2
14
12
bro can you plz explain y 14 and 12
bro hear we get
2
15
12
after changing the logical or operator to logical and the final output of the statement will be 1
and B value will be updated as 7.
how 7? can you explain??I'm confused
@@SaraswotiKhadka at last mam changed the question
i.e ( a&b && b+1 || 0 || b++) first mam explain with this example later,
The question is
( a&b && b+1 || 0 && b++) bitwise & has higher precedence so, now the expression on solving
( 2 & 7 || 0 && b++) so, 2&7 = 1
So expression changes as follows
(1 || 0 && b++) here && has higher precedence and also b is updated to 7 here as we used b++ in our expression. so, 0 && b++ is done first i.e
0&&6 output is 0, now ( 1 || (0 && 6)) BECOME
(1 || 0) Finally output of this expression is one bcoz of logical or.
@@hariparuchuru3858 may be i got it. Thank you
@@hariparuchuru3858 bro, in logical and (&&) , if 0 is one of the operand then we don't fetch the second operand and the result is 0 , as in this 0 && 6 output is 0 and we don't consider the second operand
So b++ value remains same i.e. 6
@@udaysingh6621 we don't get 7 but result is 1 only
mam your classes are super I am listening u r class 50 % for subject and 50% for you
Mam thankyou you are better than my teacher it's very helpfully for me
Again jenny ma'am you nailed it up to mark very clear and smart teaching
I love you ma'am as a student and teacher relationship ☺️💛
Ans for 1st 3 Q are 2, 14, 12
🎉🎉🎉
Hello, want your insta id 👋🏻
Which part can u mention it?
@@sumityadavazamgarh8023Bruh where it is?
@@ananthu414111:11
You can fast forward the video, Actual content started from 2:30,before this all just the unacademy promotion.
Ma'am please upload videos of pointers, structure,union,enum, files handling, command line argument of c.❤️
Yes 🙏
@@princechoudhary1025 mam has uploaded it
Mam ,you use very simple English words.
Thanks 😊
Very good teaching every topic is covered 🤗
I learned alot
Thank You ma'am :)
Now let's got for part 2
Thank you mam very nice gide & very nice best information bitwise operator teaching video.👍
like seriously ma'am u are really good, u just thought me a shortcut for this...
Technically you r correct and you are technically sound. Don't get nervous or fast while teaching. But teaching is good. But you can make it better because you are technically sound.
Yes mam please take some good, hard, and really tricky examples on Logical and Bitwise, and Relational operators combined
mam your teaching method is very impressive
Mam ur explanation is so nice like you😍😍
Good day Ma'am. 2 years later and your course is still very much relevant! Thank you for what you do.
So I have a question, when performing certain operations on while working with binary in jpeg mode, we usually have to check if the first four digits of the 4th byte of a specific amount of data is a certain value. Here, we use the bitwise & operator. My question is, when checking to see if the first four values are similar to 0xe0, why do we use the & operator with 0xf0 on one side and 0xe0 on the other? Why don't we have 0xe0 on both sides?
An example code is as shown below:
if (buffer[0] == 0xff &&
buffer[1] == 0xd8 &&
buffer[2] == 0xff &&
(buffer[3] & 0xf0) == 0xe0)
Look forward to hearing from you soon ma.
You are such a cute teacher i like all your vedios that understand able 😊😊😊
Thankyou so much mam it’s an amazing experience , learning from you ❤
Mam in this above video u said ,printf("%d
%d",a&b&&b+1|0&&b++), it will print b value as7 but it is giving only b++ old value as 6
Yes ,I also got the same answer
@@neerajaneeraja6971 me too
@@AnkitKumar-ud4vt @Neeraja Neeraja Because at second last evaluation of expression, first && operator will be evaluated then || operator will be evaluated and there is 0 as first operand in && operator then there is no need to check for the second operand and consequently b value will not be incremented.
I hope you will get it, what I tried to explain.
🙂
@@farzanaashraf8136 bhai insta id chahiye aapka
@@madhubantu5180 Why
Video starts at 2:26
Our sir in our college explained the same topic for 40mins but I understood after watching your video mam
Thank you for teaching us in an excellent manner you are extremely better than my college faculty they don't taught me all this so that I'm stuck with lot of doubts
So because of you I'm able to i understand everything thank a lot mam 💟💟💟💟💟💟💟💟💟💟💟💟💟
Tqq so much mam for ur clear cut explanation 🎉🎉❤
Mam apko dekh ke hi sb samajh me a gya🤤🤤🤤
Im with zero doubts mam thats bcoz of you tq so much mam ❤
Thank You for clarified our doubts
mam you best from my all c teachers . i saw your all videos and inspiration from your video love you mam and make new best videos on c language .
ua-cam.com/video/M1GwBX0zhC4/v-deo.html
a&b= 2, a|b= 14, a^b= 12, lastOne= 1
God bless you a million times
mam in the logical AND(&&) operator the final output will be 1 and 7 right. I didn't understood how did we got 2 there. Can you please clear this doubt mam?
The one is below 2 so
hi mam, nice explanation , in this video , which first prior , & ,+ , pervious video you explain high priorty each by binary.but while combination how we can identity which first for example & ,+ .
Thanks for help Ma'am 🙏🙏🙂
Excellent ma'am ❤️
Hi, you are the best.. thanks for your help...
Best teacher 🎉
will you make a separate video for bitwise operation examples??
In the very last example question, printf is 1 and b is 7.
Int a=10 b=6
a&b is 2
a | b is 1
a^b is 1
as it will get true and true ,ouput will be one and value of b is 6 and if it finds another b then b will be 7
Really like your explanation ma'am superb 🔥🔥🔥🔥👌👌👌👌👌👌👌
Thank you❤🌹😊 so much for your lectures madam...... Gratitude from bottom of my heart❤💖
16:20 output is 1
You are very beautiful ❤️
And the video helped me a lot
can you please tell why when a=10,b=5,a&b is 0. while when a=10 and b=6, a&b is 2.
Great ma'am ❤️.
bitwise operators can be applied on -ve numbers
amazing
thanks mam
BANGLADESH
The guy named Ladesh: ○_○
It's a very helpful video mam thank you
mam Give suggestions to MCA students , scope is fit for software
a&b =2
a|b = 14
a^b = 12
Excellent explanation
Mam do one more video on bitwise operator with more examples
I am impressed on your 💕
Mam last printf statement you said that b value will be 6 it will not be 7 but if i run that program and printf("%d",b); the output is 7 not 6
b=6 Even if && is there, it didn't get incremented while executing
#include
int main()
{
int a=10,b=6,c;
c=a&b&&b+1||0&&b++;
printf("%d %d %d",a,b,c);
return 0;
}
output==> 10 6 1
Can you tell me why?
@@syedalifathimaa9618 because logical && operator precident higher then logic ll operator
C = a & b && b+1 || 0 && b++;
C = 10 & 6 && 6+1 || 0 && b++;
C = 10 & 6 && 7 || 0 && b++;
C = 10 & 6 = 2 && 7 || 0 && b++;
C = 2 && 7 = 1 || 0 && b++;
C = 1 || 0 && b++;(logical && operator incounter 0, it will not move on b++ , it give ans 0 and b++ will not exicuted.
C = 1 || 0 = 1
I hope my explanation you will understand 😊
@@ja3r thnx bro keep it up
@jenny's lectures.Mam please explain detailed programme like that programme
It's very cleary😊
You need to start python also.. pls do the needful
I didn't understood that why the output of b would be 6 and not 7, as precedence of increment operator is more than other operators, so logically the increment operator should be executed first and the value of b must be 7 in both && case and || case.
i also same doubt!
@@vrajalingam3487 I got my answer. See precedence is checked only when a operant(or any number) has more than one operator, and not checked at first for whole statement. And in case of || only first part is checked and if that part returns true then other part is not check., same in case of &&, if first part returns false, other part is not checked.
@@lokesh6828bro l also know that even everyone but here the main problem is when we r doin b+1 i.e 6+1=7, then value of b is updated here only & in b++ we have to consider 7 & not 6 (coz the value of b is updated in the memory after doing b+1 ) i.e why when we'll print 'b' we should get 7 but still we r getting 6 .
How's that possible, l can't understand
@@Helly04
Because b++ and b+1 is not the same thing, in case of b+1 the value doesn't change in the memory it just changes where it is assigned to.
So if b=6, c=b+1 then c will become 7 but b will remain 6
in the question, && has higher precedence so, after initial solving the question comes to this,
1 || 0 && 6, here && will be evaluated first due to higher precedence, in logical and if first operand is 0, second one isn't evaluated final output becomes 0.
So now it is 1||0, in logical or if first operand is 1, final output becomes 1, second operand isn't evaluated, so the second operand b++ was never checked in any of the steps, that's why the value of b remains 6 and the final result is 1
Output of three statement are:-
O
7
7
print1=2
print2=14
print3=12
print4=1
Good explanation
Plz explain clarity of increment and decerement
Very beautifully explained 👌
Output:1
b=6
What mam told at the end, if we use logical AND then also the output will be 1 as 1 && 6 is 1 and since the first operand is true which is 1. so will b = 6 or 7? in next printf statement. Can u please explain?
b is 7 bcz in and operator first is 1 then second expression will be evaluated so in this question b is evaluated therefore b is 7
13:32 it's arithmetic not relational 🤔
thank you for this video mam😃
In last you said that b will remain 6,but wrong madam it will be 7 madam
Thanks a lot mam
You are my best guru
thank you ma'am😊😊😊
Thank you so much ma'am
How to do right shift and left shift and also more on ternary operators topics ...
NOTE: Precedence will come into picture only if expressions will be evaluated. In case of && or || its possible that some expressions may not be evaluated at all because we obtain 0 or 1 respectively. Hence, no matter how much higher precedence operators are there in those expressions, those expressions would never be evaluated
super explanation madam
Mam can you please do some vedios on python also
This was helpful
Ans for three Q
2
14
12
All the best for your Exam 👍
2,14,12 is answer for what u told to answer in comment section..
Mam can I use one operater twice in program 🙏🙏 I mean in the same line
starts at 2:26
Searching for some one commenting the start time ! Thnx
Do you a video on number system already?
There's a b+1 in expression. By the precedence b will 7 already.
So, will there be change in value of b when we add b++. ??
b+1 doesn't change the value of b, it just returns b+1. So b will be same
Mam you are looking so beautiful
At 16:23... U said to use apparends in the place of logical OR... I applied and I got ans =1. Am I right mam
Yes you are right but the value of b will not be updated, it will remain 6.