Increment and Decrement Operators in C (Part 2)

  Рет қаралды 264,822

Neso Academy

Neso Academy

Күн бұрын

C Programming & Data Structures: Increment & Decrement Operators in C (Part 2)
Topics discussed:
1. Solving expressions like a+++b.
2. Lexical analyzer.
3. Tokens.
4. Token generation.
5. Homework problem.
C Programming Lectures: goo.gl/7Eh2SS
Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
Contribute: www.nesoacademy...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy...
Website ► www.nesoacademy...
Forum ► forum.nesoacade...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CProgrammingByNeso #CProgramming #IncrementOperator #DecrementOperator

Пікірлер: 1 100
@anupriyarani6902
@anupriyarani6902 4 жыл бұрын
I have studied C from many famous youtuber and books too but I never studied C so deeply .Most of lectures brings new concepts. Thank you neso academy team 🌺
@abhishekanandjha7996
@abhishekanandjha7996 3 жыл бұрын
Agree !!!
@dennyage4791
@dennyage4791 3 жыл бұрын
Agree 110%
@simrankaursandhu4589
@simrankaursandhu4589 2 жыл бұрын
True
@coder_student
@coder_student 5 ай бұрын
True
@saibhargav5374
@saibhargav5374 5 ай бұрын
8 ans
@kunalnarsale6944
@kunalnarsale6944 4 жыл бұрын
I have started learning c from this channel . Till now i have studied c from many platforms online as well as offline . But i think this channel provides best c programming language learning . This is the BEST c programming channel i have ever seen . Also i will recommend to my other friends . Fantastic tutor !!! I have one small request , could you please upload C++ programming videos ?
@nesoacademy
@nesoacademy 4 жыл бұрын
We will start C++ soon.
@lokeshsenthilkumar4522
@lokeshsenthilkumar4522 4 жыл бұрын
@@nesoacademy when sir..still waiting?
@shivasaurabh2006
@shivasaurabh2006 4 жыл бұрын
@@lokeshsenthilkumar4522 ohhh dude me too!!!😂
@nbk330
@nbk330 4 жыл бұрын
@@nesoacademy what is the answer? kindly sir pin it...
@himanshuthakkar5963
@himanshuthakkar5963 4 жыл бұрын
@@nesoacademy sir please start as possible as early
@shubhamanand1347
@shubhamanand1347 4 жыл бұрын
best channel regarding the clarity in sound, visual and concept.
@andrevoerman1483
@andrevoerman1483 4 жыл бұрын
Indeed, and without any 'euhh' or 'lets see...' even when hearing some distractions... confident and knowing what it's about! 👍
@akankshaporwal5566
@akankshaporwal5566 3 жыл бұрын
@@andrevoerman1483 ahan :)
@Sazzad_Sabbir
@Sazzad_Sabbir Жыл бұрын
For the last question:- 1)If you set the code like this in the complier: #include int main() { int a=4, b=3; printf ( "%d", a++ + ++b); return 0; } Then the output is :- 8 2) But , if you set the code in the compiler like this: #include int main() { int a=4, b=3; printf ( "%d", a+++++b); return 0; } Then , there will be an error! Thank you guys
@jonathanooi6817
@jonathanooi6817 Жыл бұрын
How is -8 tho? Can explain for me?Thanks
@Dilip077
@Dilip077 Жыл бұрын
It's 8
@jonathanooi6817
@jonathanooi6817 Жыл бұрын
@@Dilip077 he wrote :- 8
@manu-mp5bt
@manu-mp5bt Жыл бұрын
First program is correct, it will not raise any error. And the last value is 8. Explanation: a=4,b=3; are the values we have , a+++++b means the lexemes are |a++| |+| |++b| . So 'a' is used and incremented to 5, and b is incremented to 4 and then used in expression. So the final answer will be 8. Second program will generate error because immediate after an increment or decrement we should have a variable
@jsmphompho8052
@jsmphompho8052 Жыл бұрын
@@manu-mp5bt but the question doesn't have spaces and "error" is one of the answers so I believe 8 would only be right if spaces you showing were part of the written program. please do correct me if I'm wrong. otherwise d is the right answer for me
@proggenius2024
@proggenius2024 3 жыл бұрын
You rock guys. Keep it up 👍 And yeah the answer to the homework question is d)error. Had it been written with a space as a+++ ++b, the answer would have been 8. But as it is, i.e., a+++++b, it is evaluated as |a| |++| |++| |+| |b| or (a++)++ + b which causes an error because an an increment operator doesn't take an rvalue or a++ as its operand. As discussed more clearly by neso, both increment and decrement operators work only on lvalue(left value).
@mz5821
@mz5821 3 жыл бұрын
There's an error in your statement. The answer would have been 8 if written as a++ + ++b not a+++ ++b
@monikak1421
@monikak1421 3 жыл бұрын
8
@youssefharby1153
@youssefharby1153 2 жыл бұрын
error: lvalue required as increment operand You are right i have tried it
@vortex370
@vortex370 2 жыл бұрын
@@monikak1421 he is right that will give you error .if you have watched the lecture properly then only you can get why,. It's a concept of spacing
@vortex370
@vortex370 2 жыл бұрын
@@monikak1421 he is right, you are wrong bro
@venugopalreddy8596
@venugopalreddy8596 3 жыл бұрын
I don't know how many times I should say thanks to this channel. Such a wonderful channel. Great channel.❤️
@patoogudere4394
@patoogudere4394 3 жыл бұрын
I've been in total darkness when it comes to programming, but atleast I got this firtunate opportunity to know about Neso Academy, Thank you so much Neso Academy for taking your time and provide for us these wonderful lectures, Thank you once more and be blessed
@accessdenied9393
@accessdenied9393 3 жыл бұрын
I do not know how I can describe my humble thanks to you and my admiration for you. You literally crossed all limits in brilliance and creativity. You are still glamorous and still awesome until now and for sure all the time.
@kunaldhyani
@kunaldhyani 2 жыл бұрын
Answer to the question is ERROR. As a+++++b is tokenize as - a ++ ++ + b = (a++)++ + b So, as increment operator can take only lvalue so, compiler generates error.
@sabbirahul664
@sabbirahul664 5 ай бұрын
8
@NMAJJINEERAJA
@NMAJJINEERAJA 4 жыл бұрын
Really awesome Actually I learnt c and data structures before so I thought that I can skip the videos because I I know the concept But I never skip any video because every video contains a new and interesting topic. Thank you very much sir
@chanduvs3037
@chanduvs3037 3 жыл бұрын
One of the super duper channel which I had never seen over the years. When it comes for vocalize, we can't express it out. Finally it is a student friendly tutorial.
@rhettfletch13
@rhettfletch13 2 жыл бұрын
I have enjoyed these lessons immensely. Your combined approach of discrete, literal and figurative explanations is more comprehensive and is more effective in building a stronger association for understanding the subject. The value of your understanding is made more accessible through clear instruction and is accomplishing its intention and multiplying into others being able to understand it as well. That's good teaching. It's a skill and a gift. Thank you. It's inspiring. I am a US Citizen, born and raised. I have benefited greatly from this resource. Thanks for your willingness and ability to share.
@samuelaniogbu5089
@samuelaniogbu5089 2 жыл бұрын
This is the best youtube channel to learn C-Programming. I've never read a book or seen a video explain unary operators this way.
@AlokSingh-jw8fr
@AlokSingh-jw8fr 3 жыл бұрын
I have studied C language earlier and I started thinking that I know everything but this channel makes me realize that I know everything of what was taught not everything about c language.No other youtube channel has cleared concepts this way with so many logical examples. I feel quite fortunate that I got to know about this channel in the 2nd-semester only after ruining my basics earlier by studying from other so-called famous KZbinrs.One humble request is there any book required for C language for gate prep or your videos and previous years is enough? I'll be grateful to you if you reply. If you find some words in my English rude then sorry for that because I am in earning phase
@simohimo6963
@simohimo6963 2 жыл бұрын
I never knew learning programming could be so fun and deeply informative. You just made my life better. Cheers to Neso Academy.
@boscodizilva5613
@boscodizilva5613 6 жыл бұрын
Black theme = less strain for eyes! Neso uses black background!!
@kushalavardhan
@kushalavardhan 4 жыл бұрын
why do programmers prefer Dark interface? ans : because light attracts bugs
@nfscsk
@nfscsk 4 жыл бұрын
@@kushalavardhan , 😂😂 but light kills "Viruses"!!!!!.... which means white screen (blue light) greatly affects eyes😞, but at the same time blue light(UV- ultra violet) kills "viruses"😝...
@nfscsk
@nfscsk 4 жыл бұрын
@@kushalavardhan , why do applications prefer Bright interface?? ans: because light kills viruses wow!! i created one new joke😂😂💪
@isaicsefxec9797
@isaicsefxec9797 4 жыл бұрын
@@nfscsk 🤓🤧🚶nice joke
@TonyStark-de3nx
@TonyStark-de3nx 4 жыл бұрын
Great Teacher , fabulous teaching style... ~I am your fan sir.
@AsianTvHub
@AsianTvHub 2 жыл бұрын
Best C tutorial on KZbin, so explanatory, all concepts are also easy to remember. Thanks so much for this, loving C more right now thanks to you
@ravindra_sings_
@ravindra_sings_ 4 жыл бұрын
In each and every video it seems that you are opening some parts of my mind, I am learning some new things in every video. Thank you very much sir for these amazing videos.
@half_notes_9133
@half_notes_9133 3 жыл бұрын
All the teachers are extremely good They explaine each and every word they said with easiest of ways possible. Best educational channel on KZbin.
@Official-tk3nc
@Official-tk3nc 5 жыл бұрын
Guys they are providing everything for free and some idots dislikes these types of videos. I think they need mental treatment
@vasireddyganesh
@vasireddyganesh 4 жыл бұрын
May be they are some other c teachers... 😅😅 who dont know how to teach... And they are getting jealous of our sir.... Those who dislike these videos are really fools...
@thawedmind
@thawedmind 4 жыл бұрын
some people don't like the accent. I'm following through the whole course and its really helpful because of the backgroudn knowledge which I just don't get anywhere else, other people are just looking for quick answers and wouldn't appreciate the diversion into tokens. Just to clarify I think this guys amazing I feel as if I'm getting a complete understanding for the subject. =D
@ajaysharan8130
@ajaysharan8130 3 жыл бұрын
@Nadeem Afzal yes 100% correct
@anjaliawasthi4623
@anjaliawasthi4623 6 жыл бұрын
Awesome haven't learn these operator in such a way
@aishwarya2205
@aishwarya2205 4 жыл бұрын
Same here
@compangit1524
@compangit1524 2 жыл бұрын
Comments for myself: lexical analyzer scans the code and tries to find meaningful sequences which it converts to tokens to translate. Usually, meeting a blankspace will stop the current token generation. Post-increment happens after the current value of the variable is used in the function. My answer for the assignment is d) error We first need to get the sequences of tokens to get an overview of what's about to happen. The sequence of tokens is [a] [++] [++] [+] [b]. This might seem to work, but if we try to go thru it one by one. a++ is fine, but a++++ is not. a++++ may seem valid but ++ operator requires to be accompanied by an lvalue. a++ is an rvalue hence, an error will be thrown at that point.
@emmanueldismas8062
@emmanueldismas8062 2 жыл бұрын
Guy I never knew I could understand the topic of token generation and compiler design and how it interprets. I am really grateful to be in this century where everything is in the internet. Thank you
@VamsiKrishna-ym3cr
@VamsiKrishna-ym3cr 4 жыл бұрын
Error.. a++ means a=a+1 a++++ means( a+1)=(a+1)+1 But ,lvalue is required to use increment operator..
@swagatikasahoo1531
@swagatikasahoo1531 3 жыл бұрын
Thank you for the explanation 👐
@pineapplee101
@pineapplee101 3 жыл бұрын
Cant that be a++ + ++b ?
@ojaskumar2355
@ojaskumar2355 3 жыл бұрын
@@pineapplee101 yess i thought the same process🙌
@VamsiKrishna-ym3cr
@VamsiKrishna-ym3cr 3 жыл бұрын
@@pineapplee101 lexical analyser scans longest and valid Tokens ..there we are given a+++++b and if we generate tokens we get 'a' ,'++' ,'++', '+' , 'b'...
@hetaeramancer
@hetaeramancer 3 жыл бұрын
@@pineapplee101 i think this can work, and it will be equal to 8 a++ and then + and then ++b
@yadvendragarg1747
@yadvendragarg1747 4 жыл бұрын
Best teaching style Only from one lecture i understood so many concept Thank sir .
@namitasharma5201
@namitasharma5201 4 жыл бұрын
no words to show gratitude. Thanks for doing the great work. Thank you so much.
@ernestekomwa-b5h
@ernestekomwa-b5h 3 ай бұрын
Thank you Neso academy for taking your time to deliver this wonderful lectures to us
@FaisalAhmed-jd9rr
@FaisalAhmed-jd9rr 3 жыл бұрын
You are the best teacher that I have ever got in my entire student life.
@camerald8257
@camerald8257 3 жыл бұрын
The last question is tricky, but it means I just have many things to learn. I am lucky to find this channel now as a 1st year college stud.
@its_SR07
@its_SR07 2 жыл бұрын
error is the ans
@prabhatsingh6124
@prabhatsingh6124 2 жыл бұрын
@Anonymous OP nope error will be the answer
@desuchan3313
@desuchan3313 2 жыл бұрын
@@prabhatsingh6124 is it because the fact that u cannot increment operators am I right?
@dennyage4791
@dennyage4791 3 жыл бұрын
In every video I am liking it first, than watching it , 😂😂 Becoz , many people forget to like , becoz of excitement ! Great course sir
@every_things_is_here
@every_things_is_here Жыл бұрын
#include int main() { int a=4, b=3; printf("%d", a+++++b); return 0; } output : 8 solving: a++ + ++b hear a++ is post, or ++b is per and + is use of addition
@sandhyachowdhary2511
@sandhyachowdhary2511 4 жыл бұрын
Your teaching is extremely good . Very deep explanation on concept I have got deep understanding on each and every concept. Thank you very much sir. Wish you were my teacher in college wouldn't have hated coding.🙏
@barrysampson5275
@barrysampson5275 2 жыл бұрын
With this lectures I'm one step ahead of the teacher, well explained
@pardhasaradhi4291
@pardhasaradhi4291 3 жыл бұрын
I have a doubt on it for long time since then I frequently searching to solve my doubt but no one clarify in depth you clarified it. Thank you bro👑
@TonyStark-de3nx
@TonyStark-de3nx 4 жыл бұрын
Sir u are my favorite teacher in all KZbin teacher even you are from one of the best teachers of my life.... Thank you so much sir
@rahulreticent5034
@rahulreticent5034 5 жыл бұрын
Output = 8 a, ++, +, ++, b will be tokens generated by lexical phase As ++ is a unirary operator so after first ++ is generated second ++ won't find any variable near it so it backtrack to + only and then ++ will be generated next token bcz it will find b as nearest variable.
@kanikabhatt2515
@kanikabhatt2515 2 жыл бұрын
yes got the same answer
@PankajYadav-ct7hw
@PankajYadav-ct7hw 2 жыл бұрын
Yes you are right 👍
@ohhhokkk391
@ohhhokkk391 2 жыл бұрын
@@PankajYadav-ct7hw No, it’s error
@khushisainisaini8864
@khushisainisaini8864 Жыл бұрын
Ryt
@neel7543
@neel7543 Жыл бұрын
wrong answer answer will be error
@0x656e
@0x656e 4 жыл бұрын
Such an awesome contents you provding here sir. Thank you. May you live long, healthy and happy❤
@TonyStark-de3nx
@TonyStark-de3nx 4 жыл бұрын
Sir, I don't know your name but the way that u taught us is awesome. I really enjoy all these and learn a lot from these series.....
@anupriyarani6902
@anupriyarani6902 4 жыл бұрын
Follow Neso academy in instagram. You will get to know all the members of neso academy 😁
@whatever361
@whatever361 20 күн бұрын
This lecture was realy insane, I realy love your lecture sir, they are full of new concepts everyone of them, this one too lexical analyzer ! wow ! thank you so much !!
@prateekraghuvanshi1291
@prateekraghuvanshi1291 6 жыл бұрын
a++ means a= (a+1) a++ ++means (a+1)=(a+1)+1 which is not allowed so it will produce error
@thawedmind
@thawedmind 4 жыл бұрын
gotta try it to be sure, gonna do that in a min, but I think that the token analyser will token it like this [a++][+][++b].
@thawedmind
@thawedmind 4 жыл бұрын
you were right, It sees it as a r value.
@sadirirfan9008
@sadirirfan9008 4 жыл бұрын
@@thawedmind but it can analyse like this way also [a++][++][+][b] because [++] is a valid lexeme.
@YoYo-nt7yf
@YoYo-nt7yf 4 жыл бұрын
No it read from the left so it will be a++ which is 5 Then a++ (here a is 5) ie. 6 a is 6 and b is 3 So 6+3 which is 9
@sambitmishra129
@sambitmishra129 4 жыл бұрын
@@thawedmind u are wrong bro, compiler start reading character from left to right until it finds meaning full token.
@sarder681
@sarder681 2 жыл бұрын
Legend bro you are! I am doing my BSC in computer science .until to complete my bsc i will stay with your cannel. From Bangladesh.
@Entertainment-fl6ep
@Entertainment-fl6ep Жыл бұрын
Which university bro🤓??
@HM_Shah_Paran
@HM_Shah_Paran 2 жыл бұрын
a ++ ++ + b. Value 'a' assigns 4 in the equation first, then increments. So, 4++ +3 is the completion of equation. Since 4 is a constant and a constant can't handle increment operator, this is an error.
@shambhaviaradhya21
@shambhaviaradhya21 4 ай бұрын
the best channel for code learning
@aminhoney3644
@aminhoney3644 5 жыл бұрын
Input: a+++++b Output: Lvalue error
@souvikgoswami5758
@souvikgoswami5758 3 жыл бұрын
I have never study any Programming Language so deeply . There are lot of things available in the market but none can Provide such content .
@pritamkrdas8696
@pritamkrdas8696 4 жыл бұрын
It will show an error ,, but if we. Put the line. Like a++ + ++b then it will give the output 8 .. so after putting space at a &b we will get the output
@anmolahsaas
@anmolahsaas Жыл бұрын
The tiniest bit of detail provided by Neso Academy is commendable. Many paid courses are not at par with the level of content provided by Them.
@mohithkumar3522
@mohithkumar3522 5 жыл бұрын
error: lvalue required as increment operand printf("The value of %d+++++%d %d is:",a,b,a+++++b);
@Kevin-yl4hm
@Kevin-yl4hm Жыл бұрын
You are the best teacher I have found for c programming.
@selvalakshmis.v4232
@selvalakshmis.v4232 3 жыл бұрын
d)Error Reson: lvalue required as increment operand Thank you, Sir
@himanshudubey9822
@himanshudubey9822 3 жыл бұрын
I thanks a lot Anikalp ❤️ for recommending me this channel.
@estellaricaluna7927
@estellaricaluna7927 4 жыл бұрын
The best channel
@ramyakrishna9558
@ramyakrishna9558 6 жыл бұрын
the answer is 8. because if we proper tokens between them like |a++| |+| |++b|. In que a=4 and b=3, |a++|=4 and |++b|=4 depending upon the given terms explaing in vedio on pre and post increment. so the answer is 4+4=8.
@abdulkareemqasem7183
@abdulkareemqasem7183 5 жыл бұрын
first of all you ar really great teacher ,I like the method you use to explain .regardless of it is my first time keeping following a lecturers online put I truly got a huge benefit out of your lecturers ,the answer is 8 because after token generation |a| |++| |+| |++| |b| so post increment we will use the value first the increment but in pre increment we must first increment the value .It goes like this a=4 b=3 so 4+4=8
@slobodantajisic2762
@slobodantajisic2762 3 жыл бұрын
Those are not the longest sequences of meaningful characters. What about |a| |++| |++| |+| |b| ? These are the longest sequences of meaningful characters, so we get an error "lvalue required as increment operand", because a++ ie a = a + 1 is not lvalue.
@ayushisrivastava7535
@ayushisrivastava7535 3 жыл бұрын
Best channel I study a lot of channels but this one is best 🤗🤗thanks sir
@hymasubramanyan
@hymasubramanyan 6 жыл бұрын
answer is 8 ,when we put proper spacing between the operators, ie, a++ + ++b;
@duartemonteiro9459
@duartemonteiro9459 5 жыл бұрын
But there is no proper spacing here
@manalkhazraj
@manalkhazraj 5 жыл бұрын
Why not 9. If a++ is 5 Then + ++b is 4 5+4=9 I don't understand
@duartemonteiro9459
@duartemonteiro9459 5 жыл бұрын
@@manalkhazraj It is just error.
@vishalray4230
@vishalray4230 5 жыл бұрын
@@manalkhazraj a++ is post increment operator,hence increment will be after the evaluation.
@ayushrana3429
@ayushrana3429 4 жыл бұрын
No you are wrong answer is error
@swathik3491
@swathik3491 5 жыл бұрын
a++ ++ + b as a++ is replaced with 4 but for ++ no operand availabe it produce error
@subhrajitbiswas5829
@subhrajitbiswas5829 4 жыл бұрын
a++ + ++b=8
@cs04abhinavasthana36
@cs04abhinavasthana36 4 жыл бұрын
@@subhrajitbiswas5829 no wrong
@cs04abhinavasthana36
@cs04abhinavasthana36 4 жыл бұрын
@@subhrajitbiswas5829 sequence se token mein convert hoga n
@cs04abhinavasthana36
@cs04abhinavasthana36 4 жыл бұрын
Ryt
@subhrajitbiswas5829
@subhrajitbiswas5829 4 жыл бұрын
Ohh yes
@Foodfind217
@Foodfind217 Жыл бұрын
Answer of the last question is 8 Because (a++) + (++b) =4 + 4 = 8 And a contains 5 and b contains 4
@vikassaini1935
@vikassaini1935 4 жыл бұрын
FAR Better than my college professors
@cfmrediochannel
@cfmrediochannel 3 жыл бұрын
Sir I am country is sri lanaka.you best teacher.sir can you send the lecture slide?
@nileshtadagonda6647
@nileshtadagonda6647 2 жыл бұрын
Q3> It will show Error , if we put space before and after of middle + then answer will be 2)8.
@UNKNOWN-tq4lq
@UNKNOWN-tq4lq 2 жыл бұрын
the main data entry is planked so it will be only 8 when the data type been planked. this will be the correct explanation for this answer
@shivangimaurya768
@shivangimaurya768 Жыл бұрын
Best teacher .....💙💙 Before I came to know about u I really face difficulty with all this stuff .... Such an amazing teacher...
@kandy1249
@kandy1249 5 жыл бұрын
Great conceptual video
@meetkathrecha1448
@meetkathrecha1448 9 ай бұрын
Sir , I have no words to thank you. ❤️Next level content.😊
@niranchana_kv69
@niranchana_kv69 4 жыл бұрын
Output : error: lvalue required as increment operand
@SEVENSOVON
@SEVENSOVON Жыл бұрын
Very good and clear lecture on c programming i love this teachers learning techniques,i am a bca student 2024❤
@purushothamchembeti8606
@purushothamchembeti8606 6 жыл бұрын
ans:error because a+++++b can be generated as token as |a| |++| |++| |+| |b| now as it is the post increment first the equation will be evaluated then operand will be incremented, so a+b=7, and a=4 , two ++, ++ operators will be there, as increment acts on single operand another ++ can't be evaluated.so it gives error.
@chirontanbhuyan51
@chirontanbhuyan51 5 жыл бұрын
No it is 7
@chirontanbhuyan51
@chirontanbhuyan51 5 жыл бұрын
Type it in your pc
@yashbhanderi1285
@yashbhanderi1285 4 жыл бұрын
Checked in decoder... You are wrong chirontan... It shows error
@sridhars8366
@sridhars8366 4 жыл бұрын
@@chirontanbhuyan51 its error sir!!
@su_kumar
@su_kumar 3 жыл бұрын
After studies c programme in many channel i found this channel and i think I feel better after study in this channel thank you so much sir🥰🥰🥰🥰
@rangrezuzma9853
@rangrezuzma9853 4 жыл бұрын
You have a great knowledge sir
@MahmoudGamal1999
@MahmoudGamal1999 Жыл бұрын
Lexmer will convert it to -> |a| |++| |++| |+| |b| and it will consider the two double pluses, a++ ++, undefined then it will produce an error!
@jeevajeevan1346
@jeevajeevan1346 4 жыл бұрын
error: lvalue required as increment operand
@reecharanjan8343
@reecharanjan8343 3 ай бұрын
Life saviour channel❤
@ahmedelhddad9744
@ahmedelhddad9744 4 жыл бұрын
Best channel Ever!!
@barrysampson5275
@barrysampson5275 2 жыл бұрын
thank you sir, im from africa
@tharunkumarcheripally9712
@tharunkumarcheripally9712 4 жыл бұрын
By Lexical analysis , which provides meaningful expressions expression : a++ + ++b = 4 + 4 = 8
@Shivakumar-xt6ne
@Shivakumar-xt6ne 2 жыл бұрын
It is the crt answer bro
@santhoshteja1849
@santhoshteja1849 16 күн бұрын
if we use a+++++b ,then u will get error,but if we use a++ + ++b,then u will get value 8.
@Tussu17
@Tussu17 6 жыл бұрын
Awesome tutorial
@yeruvavanachinnapareddy07
@yeruvavanachinnapareddy07 2 жыл бұрын
Even ,nit Suratkal students almost every one watch this series of c programming tutorial,,... really good
@gullymusic3200
@gullymusic3200 2 жыл бұрын
Which branch bro
@aditisharma8482
@aditisharma8482 5 жыл бұрын
Answer is d...it gives an error name Lvalue required .......but when I write the code (a++ + ++b)there is no error
@matlapudipavaneswarsatyaap2667
@matlapudipavaneswarsatyaap2667 4 жыл бұрын
answer is b
@matlapudipavaneswarsatyaap2667
@matlapudipavaneswarsatyaap2667 4 жыл бұрын
sorry guys answer is d it divides the lexemes into a ++ ++ + b .and groups into a++ ++ +b .here lvalue is not there to store the value it gives error. So, answer is d.
@004_it_ajay_veerabaghut5
@004_it_ajay_veerabaghut5 4 жыл бұрын
@@matlapudipavaneswarsatyaap2667 Yeah I thought the is B .because lvalue divide like this a++ /+ /++b 🤔
@pradoshkumarrout519
@pradoshkumarrout519 4 жыл бұрын
They have no spaces. Between them so lexical will find the second (++) right after the first (++) ends.
@matlapudipavaneswarsatyaap2667
@matlapudipavaneswarsatyaap2667 4 жыл бұрын
@@pradoshkumarrout519 no bro
@ramesh.pikkili6886
@ramesh.pikkili6886 3 жыл бұрын
Great teacher who explaining crystal clear
@TheFeaturedGuy
@TheFeaturedGuy 2 жыл бұрын
the last question answer is an error because in token generation we get |a| |++| |++| |+| |b| in this case we are getting a++ ++ = (a+1)++ here (a+1) is a rvalue which is not allowed for increment so we will get an error.
@CigEconomy
@CigEconomy 2 жыл бұрын
You're the only one I saw who got the answer and explained it correctly.
@pearlpatel9561
@pearlpatel9561 4 жыл бұрын
Nice method of teaching...Superb....I love it
@saswatpradhan5549
@saswatpradhan5549 6 жыл бұрын
This channel taught me the topics that I learnt from college and then ignored it thinking irrelevant.
@jsmphompho8052
@jsmphompho8052 Жыл бұрын
The answer is definitely d. Thank you so much for the great explanations
@nirmalamanthngauda1517
@nirmalamanthngauda1517 6 жыл бұрын
Great Teacher!
@krutarthpatel6537
@krutarthpatel6537 4 жыл бұрын
Congratulations for 1M🎉🎉
@viveksai8893
@viveksai8893 3 жыл бұрын
Answer for the given homework problem is 8 and thank you very much sir for helping lot of students to study through this course
@gnanyadapa9666
@gnanyadapa9666 3 жыл бұрын
It's error.
@shilpimittal6918
@shilpimittal6918 3 жыл бұрын
you are awesome sir..................................thank you so much!!!!!!!!!!!!!!!!!!!
@noindamster3581
@noindamster3581 4 жыл бұрын
[a] [++] [++] [+] [b] is error as no operand for 2nd [++] so is it possible for lexems to be like this? [a] [++] [+] [++] [b] because it has a option to either read it like [+] or [++]
@poornachandra3138
@poornachandra3138 3 жыл бұрын
Hello
@shreyaskulkarni526
@shreyaskulkarni526 3 жыл бұрын
2:43 it always matches the longest character sequence, so their is no option read it like + or ++, it will read it as ++ and not +
@rohannayak3827
@rohannayak3827 3 жыл бұрын
SO ANSWER IS SAME 7/ERROR
@anuj_chaudhary_2430
@anuj_chaudhary_2430 3 жыл бұрын
@@rohannayak3827 nups may be its 8/ error...still confused
@gnanyadapa9666
@gnanyadapa9666 3 жыл бұрын
It's the first way and the answer is error
@otetumooluwaseun3948
@otetumooluwaseun3948 Жыл бұрын
You are definitely an institution. I have gained immensely from here. Can you please give a video on the factors to consider when writing edge cases. I am learning C to write custom functions of some of the built in functions. Thank you very much.
@syamsaiprathi5869
@syamsaiprathi5869 4 жыл бұрын
The answer was 8 for homework question sir
@danishimwe278
@danishimwe278 2 жыл бұрын
it will produce error! thanks for this course, you're really great..
@addictiveguitarist6811
@addictiveguitarist6811 2 жыл бұрын
Sir, you are great 😍.....i really understand the concepts deeply taught by you 😁. The answer will be for the last quest .|a| |++| |++| |+| |b| This will give error because it is unvalid expression 😁
@Sweetishyam5
@Sweetishyam5 3 жыл бұрын
Error is the last question's answer.thank you neso academy
@rowdyghatkar
@rowdyghatkar 4 жыл бұрын
It runs the program when we use spaces i.e a++ + ++b and outputs 8 ... Otherwise gives errors.
@ritikshrivastava9442
@ritikshrivastava9442 4 жыл бұрын
Right bro
@ritikshrivastava9442
@ritikshrivastava9442 4 жыл бұрын
@Poonam Rathore in my opinion it is the compiler error Bcoz when we are adding a+++b compiler simply generating token in that way a++ + b (I don't know how to put the value under the box in typing so I used space for clarification ) So, in given question we can think that the compiler should generate tokens in that way a++ ++ + b But what compiler do a++ but it is unable to add another post increment in it that's why it is showing error I think this might be helpful to you I am not 100% sure if someone clarify more betterly then leave a comment
@RAVITEJAP-ss9rl
@RAVITEJAP-ss9rl 4 жыл бұрын
@Poonam Rathore a+++++b in token is a ++ ++ + b. So it is same as writing [(a+1)++]+b..... And for the post increment operator lvalue is required but here a+1 is not a lvalue. So we get an error.
@satwik-ej6us
@satwik-ej6us 3 жыл бұрын
The best channel for c and answer is 8 and teaching is very good
@kancharlajyothi2020
@kancharlajyothi2020 2 жыл бұрын
Last question answer is Error
@satyamgawade4244
@satyamgawade4244 2 жыл бұрын
Q3) L value required error Evaluation (a++)++ + b Once a++ is evaluated then it becomes 4++, since 4 is not a modifiable l value, compiler will throw and l value required error
@sreemoyeepradhan7707
@sreemoyeepradhan7707 2 жыл бұрын
Is the correct answer for Q 3 option (b) 8?
@koinahotahai
@koinahotahai 2 жыл бұрын
No , error will arise
@tomidebbie2078
@tomidebbie2078 2 жыл бұрын
@@koinahotahai why
@tomidebbie2078
@tomidebbie2078 2 жыл бұрын
@@koinahotahai it will be seperated in tokens as a++ + ++b
@koinahotahai
@koinahotahai 2 жыл бұрын
@@tomidebbie2078 error arises
@sungchulyonseiackr
@sungchulyonseiackr 2 жыл бұрын
@@tomidebbie2078 a | ++ | ++ | + | b = ((a++)++ error at this step since a++ is a rvalue)+b
Relational Operators in C
3:36
Neso Academy
Рет қаралды 238 М.
Increment and Decrement Operators in C (Part 1)
10:55
Neso Academy
Рет қаралды 426 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Operators in C (Solved Problem 2)
6:27
Neso Academy
Рет қаралды 176 М.
Understanding Ownership in Rust
25:30
Let's Get Rusty
Рет қаралды 280 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 857 М.
Input and Output in C++
18:09
Neso Academy
Рет қаралды 285 М.
Logical Operators in C
12:09
Neso Academy
Рет қаралды 450 М.
I Spent 100 Hours Inside The Pyramids!
21:43
MrBeast
Рет қаралды 23 МЛН
The 7 Levels of Math Symbols
14:03
The Unqualified Tutor
Рет қаралды 59 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 584 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,3 МЛН
TLS Handshake Explained - Computerphile
16:59
Computerphile
Рет қаралды 578 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41