ans: True if(ac) given now have same precedence and their associativity is from left to right. initially ac also gives so now 1==1 which is true. == has low precedence compared to relational operators like >,>=,
Relational > Equality operator: -> a c -> (a c) -> ((a c) (Associativity left-right) -> ((10 30) -> ((1)) == (1) -> 1 (true) True block will execute and TRUE will be printed
Answer is True. Seeing all the videos from East Africa , planning to appear for GATE in 2021. I am getting confidence by listening to your lectures. Thank you for your extraordinary work. :)
It is the best channel to learn programming , i have watched many other channels , but i was not satisfied , but today I saw this channel and watched few videos and i am satisfied, now I have started to understand everything, thanks a lot
a).True if(ac) given Now have the same precedence and their associativity is from left to right. Initially, ac also gives so now 1==1 which is true. == has low precedence compared to logical operators like >,>=,
Sir, I am an avg student of cse 😢. I watched ur videos one day before exam the difference between ur channel and other channels is this channel provides deep concept , examples and questions for students. Thank you soo much sir.
very nice channel for learning each concept and logics in C programming. #include #define x printf("THANK U SO MUCH NESO ACADEMY") int main() { x; return 0; }
Ans will be true because having same precedence but due to left to right associativity . Here, ac also results 1 and then == will execute which prints true.
Comments for myself: Associativity is order of evaluation when expressions have the same precedence, could be left-to-right or vice versa. Postfix increment/decrement has greater precendence than prefix. Associativity of postfix operator is from left to right, while prefix is from right to left. Only the assignment, conditional, and unary operators have an associativity of right to left. Associativity only works of we have more than ONE operators of same precedence. If only one, the behavior is undefined and output is compiler dependent. For the assignment, the output is TRUE
1. we have a condition expression --> (a c) 2. Relational precedence is higher than equality precedence therefore, . 'b' belong to '' operator ---> (d > c), which return TRUE . according to Associativity order Left to Right: (a C) 3. finally Equality will be evaluated (1 == 1), therefore the if construct will return TRUE
int main(void) { int a=10, b=20, c=30, d=40; int expr = (a c); printf("%s", expr ? "true" : "false"); return 0; } In this example "true" get printed out. Because, "" operators take precedence over "==" operator, so both "" evaluated first then "==" operator: (10 30) Both (10 30) return true, which it is represented by 1 (or any non-zero), so the expression expanded like that: (1 == 1) Now because of (1 == 1) returns true (non-zero), "true" get printed, otherwise "false" keyword would have been printed.
so what happen in the last question is that (ac). so there are 2 relational operator and 1 equality operator or u can say (a relational operator b equality operator d relational operator c). so relationall operator has higher precedence and it goes from left to right then (1030), 1030 that s also true (1) then 1==1 true == true that s also true, so TRUE
if(ac) in this expression left to right associativity is there a30 now 1==40 returns false means 0 now 0>30 returns true means 1 if(1) means true so TRUE will be the answer
Sir I have a doubt. Could you explain the reason for such behaviour. #include int main() { int a=10; int b= ++a + a++; printf("%d ",b); return 0; } Output : 23 But expected answer is 22 because first postfix will be evaluated then prefix and sum and at last assignment b= 12+10 Sir please explain this.
the answer is TRUE. BECAUSE the relational operators has more precedence than equality operators, so (ac), here same precedence so associativity is from left to right, hence both returns true which means 1==1 and it is also true so the final O/P is; T R U E.....................................
Output is true, because relation operater will return only true or false, here will perform because it is left to right associative both are returning true and both == same.
Don't know, because (a c) is also true and return non zero. And finally if(non zero == non zero) sometimes equal or not equal. Therefore I can't predict the answer all times. So it may be compiler dependent.
I just dont understand how the brains of the people who have disliked the vedio work, really I don't just get it. May be undertanding them is more complicated than C language.
@ 14:28 example, Why is Neso Academy bring printed ? 1) variable "a " is an type. 2) The function is returning only 1 not Neso. and why does it return Neso ?
ans: True
if(ac) given
now have same precedence and their associativity is from left to right. initially ac also gives so now 1==1 which is true. == has low precedence compared to relational operators like >,>=,
How does ac also....plz reply I really need to know!!!!!!!!!!!!
@@awsomeindia1295 a
@@vishaliravichandran1314 thank u so much for explaining this😄😄
@@awsomeindia1295 sun if some thing is true it return 1
In if condition it is true == true right??
Sir i am a cse student.... C is the 1st language for a cse student... I never forget you in my life
Serving people is serving humanity....nice job luv it
Serving people = serving God .
@@dynxmit3official920 Yay!
@@dynxmit3official920 serving people != serving god
Relational > Equality operator:
-> a c
-> (a c)
-> ((a c) (Associativity left-right)
-> ((10 30)
-> ((1)) == (1)
-> 1 (true)
True block will execute and TRUE will be printed
thanks bhai
@@FireUpBITSPILANI thank you very much
I also did the same but in my mind!
As relational operator has higher precedence a c turns to 1. Therefore 1==1. Hence true will be printed because if block will get executed.
This guy is going straight to haven 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
you r rit
Yeah!✨
Yes heaven
We dont go to ravenholm
Fire symbolises hell
Bruh he is alive & saving people why do you want to kill him now 😂 or atleast why speak of his death.
Answer is True. Seeing all the videos from East Africa , planning to appear for GATE in 2021. I am getting confidence by listening to your lectures. Thank you for your extraordinary work. :)
gat me asy question kab aty hen...gat me gk, genral math etc ata zyda
@@kamilmusic9929 ????
@@nagashayanreddy7237 sir gate me programming aati h ?
@@nagashayanreddy7237 bro if you're indian then what're you doing in east africa?
Did you appear for gate bro?
It is the best channel to learn programming , i have watched many other channels , but i was not satisfied , but today I saw this channel and watched few videos and i am satisfied, now I have started to understand everything, thanks a lot
a).True
if(ac) given
Now have the same precedence and their associativity is from left to right. Initially, ac also gives so now 1==1 which is true. == has low precedence compared to logical operators like >,>=,
Sir, I am an avg student of cse 😢. I watched ur videos one day before exam the difference between ur channel and other channels is this channel provides deep concept , examples and questions for students. Thank you soo much sir.
(ac) presedence:2
== Presidence:3
Answer: true
Assignment answer is: true(as 1030 is also true and both cases are compared with equality operator so it is true.)
very nice channel for learning each concept and logics in C programming.
#include
#define x printf("THANK U SO MUCH NESO ACADEMY")
int main()
{
x;
return 0;
}
Luv it..❤your content are really very easy to understand and that question u provide at the end...is a bliss..💓💓keep working like that
a=10 , b=20 , c=30 , d=40 ;
( a c)
Explanation :
(10 30)
Here first ...10
Thanks for answering...it helped me to understand ❤️🤝
you are great sir (: the way you are clear all concepts is awesome please upload more computer science subjects so that we people will helpful.
a30] which is true
ac
True==true
So, output is true😊
Is it correct ??????
the ans is true ,
explanation :-
if(ac)
{
cout
Thank u bro or explanation
Ans will be true because having same precedence but due to left to right associativity . Here, ac also results 1 and then == will execute which prints true.
Sir please compelete the C programming series it will be useful for our placements....please sir. Your video are really good.Thank you so much sir..
Hello sir , I don't know u ll see my comment or not but u r god for the students who have eager to learn c language .
Comments for myself: Associativity is order of evaluation when expressions have the same precedence, could be left-to-right or vice versa. Postfix increment/decrement has greater precendence than prefix. Associativity of postfix operator is from left to right, while prefix is from right to left. Only the assignment, conditional, and unary operators have an associativity of right to left. Associativity only works of we have more than ONE operators of same precedence. If only one, the behavior is undefined and output is compiler dependent. For the assignment, the output is TRUE
as per ac
a belongs to
so precednce applies
(ac)
in this case we have only one operator == so there is no need to apply associativity
Neso is best 👍
16:10 and the answer comes out to be True
thanks Neso❤
Tq so much i gone theough many websites but this is the 1 which fastly understand and went into my mind 😊😊
1. we have a condition expression --> (a c)
2. Relational precedence is higher than equality precedence therefore,
. 'b' belong to '' operator ---> (d > c), which return TRUE
. according to Associativity order Left to Right: (a C)
3. finally Equality will be evaluated (1 == 1), therefore the if construct will return TRUE
int main(void) {
int a=10, b=20, c=30, d=40;
int expr = (a c);
printf("%s", expr ? "true" : "false");
return 0;
}
In this example "true" get printed out. Because, "" operators take precedence over "==" operator, so both "" evaluated first then "==" operator:
(10 30)
Both (10 30) return true, which it is represented by 1 (or any non-zero), so the expression expanded like that:
(1 == 1)
Now because of (1 == 1) returns true (non-zero), "true" get printed, otherwise "false" keyword would have been printed.
Answer is True.
Because ,d>c is true that is 1
and a
The answer for the question is True. Thanks for the great explanation 😍😍
You are the god for many students sir love you ❤️
this your video is best and is this is fully complete series for gate sir plz tell i am following your series
You are the real hero sir........ 🙏🙏🙏🙏🙏
Thankyou very much. I have started C programming lectures in Hindi. you are helping me a lot.
Ans is true....i understand the concept very well☺..thakiieeww soo mch...
so what happen in the last question is that (ac). so there are 2 relational operator and 1 equality operator or u can say (a relational operator b equality operator d relational operator c). so relationall operator has higher precedence and it goes from left to right then (1030), 1030 that s also true (1) then 1==1 true == true that s also true, so TRUE
Thanks a lot sir for these types of great videos...
ans=true;
#include
int main()
{
int a=10,b=20,c=30,d=40;
if (a c)
{
printf("true");
}
else
{
printf("false");
}
return 0;
}
Since the
home works answer is true
thank u so much to give such a great content free of cost
The output of the homework problem is TRUE.👍
if(ac) in this expression left to right associativity is there
a30
now 1==40 returns false means 0
now 0>30 returns true means 1
if(1) means true so TRUE will be the answer
Thank you so much, bro, you explain this so well; I'm set for success in my class moving forward
(2+3)*5 =25 it is correct and it is called distributive property of multiplication over addition, 5*2+5*3=25
✔️
i can't know how can i thank you
great content ..... thank you very much 💙💙💙💙💙💙
Superb explanation 👍
So much attractive content thanks for it. Ans. True
Ans is true.because in relational operators priority is ,=,==,=! . so according to this priority ans is considered as true
Thanks!
True is the answer of the homework problem................
ac gives true and true = = true so its print True
Answer of the question of this lession:
True
Excellent
Sir I have a doubt.
Could you explain the reason for such behaviour.
#include
int main()
{
int a=10;
int b= ++a + a++;
printf("%d
",b);
return 0;
}
Output : 23
But expected answer is 22 because first postfix will be evaluated then prefix and sum and at last assignment
b= 12+10
Sir please explain this.
True..
As relational operators have higher precedence than equality operator.
the answer is TRUE.
BECAUSE the relational operators has more precedence than equality operators,
so (ac), here same precedence so associativity is from left to right,
hence both returns true which means 1==1 and it is also true so the final O/P is;
T R U E.....................................
Thank you so much sir...you defined it with..minute details
Very well understood everything. Thanks you sir 🤗🤗
Ans:True
ac is true which results 1;
but 1==1 is True;
so ans is True
thanks for this wonderful video
Very nice explanation, my all doubts get clear.
Sir plz make videos on cmos basics and its gate implementation.🙏🙏
Your videos are helping me alot thank you so much🙏🙏😊
True
Thank you, Sir
Tussi great ho Sir ji
one video in 2 day means syllabus finish before gate 2019 we can expect with you thanks
Thank you so so so so so much sir....really helpful and detailed video
if we consider () paranthesis as an operator then there is more than one operator in the expression fun1() + fun2()
good initiative
Output is true, because relation operater will return only true or false, here will perform because it is left to right associative both are returning true and both == same.
Thankyou For these Lectures Sir :)
Don't know, because (a c) is also true and return non zero. And finally if(non zero == non zero) sometimes equal or not equal. Therefore I can't predict the answer all times. So it may be compiler dependent.
No it is not the case, when a given condition becomes true it returns 1,when it is false it returns 0, here 1==1 true is printed.
but in relational operator(==) non zero value is taken as true so, true(any non zero value)== true ,
so result is true..
You are insane man!! 🔥🔥🔥
U r awesome Sir doing a great job....
I just dont understand how the brains of the people who have disliked the vedio work, really I don't just get it. May be undertanding them is more complicated than C language.
if u work like this so we'll no need of rbr sir paid lecture
true bhai
Exactly, his course is not worth in terms of depth. He just makes everything memorise.
are these lectures better than rbr sir paid lecture? plz tell
This the best channel👌👌👌
Explain various operators with its precedence in c.
Explain various operators in c.
Sir this two questions are same or different
Homework answer : TRUE
Sir ,Plz upload more videos on loops,arrays n all the topics of C language, U'r videos are helping me a lotttttt bcozz..Plz..
Answer is: TRUE. Why? Because relational operator ( < , >, >=,
Sir.u pin correct answers.and I enjoy ur series ❤❤
Output: True
It ' ll print true
Answer is true
If condition is true
True==True that is
1==1
o/p:True
@ 14:28 example, Why is Neso Academy bring printed ?
1) variable "a " is an type.
2) The function is returning only 1 not Neso. and why does it return Neso ?
True as all the parenthesis have same associativity...
everyone underestimates precedence and associativity without knowing that they are the most important topics...
Right
mohit,vai...
i can't memotize this associativity & precedence table. Please help me, if possible
@@tawseeftaher4446 practice bro... Do practice
(a c). true == true true
true will be answer
btw sir, do we have to learn the table?
Advance happy 1m subs ♥️ from Philippines
Thank you :)
I just solved my assignment sir it really helps a lot promise
great teaching sir
Just apply BODMAS or BODMASModulus in calculations.
No it won't be true
You work is really outstanding. I would appreciate if you could post all C related videos before 2nd feb' 2019 (GATE).
sir please make more videos on basic c programming.
Great job sir
output is true
True is the answer
answer is : TRUE
Answer is :- True