Hello all, what is the difference between *grade++ *(grade++) (*grade)++ ++*grad
ID: 3615963 • Letter: H
Question
Hello all, what is the difference between *grade++ *(grade++) (*grade)++ ++*grade *++grade *(++grade) please with examples... I didn't understand manipulationgpointers very well help asap Hello all, what is the difference between *grade++ *(grade++) (*grade)++ ++*grade *++grade *(++grade) please with examples... I didn't understand manipulationgpointers very well help asap *(grade++) (*grade)++ ++*grade *++grade *(++grade) please with examples... I didn't understand manipulationgpointers very well help asap (*grade)++ ++*grade *++grade *(++grade) please with examples... I didn't understand manipulationgpointers very well help asapExplanation / Answer
*grade++ // will increment the value present in the gradevariable by one suppose total=10, andgrade=&total, then this statment will made change the value of totaland it will now 11. *(grade++) // address which is present in thegrade will be incremented and then value at that address ispointed. suppose total=100, and address of total is stored ingrade=&total (suppose this address is 0x002), after theexecution of this statement address will be 0x003. (*grade)++ // value is get and then incremented (post increment) ++*grade // value is get and then incremented (pre increment) *++grade //I think this is error... *(++grade) value of grade is incremented and then value present at thataddress is retrieved. *(grade++) // address which is present in thegrade will be incremented and then value at that address ispointed. suppose total=100, and address of total is stored ingrade=&total (suppose this address is 0x002), after theexecution of this statement address will be 0x003. (*grade)++ // value is get and then incremented (post increment) ++*grade // value is get and then incremented (pre increment) *++grade //I think this is error... *(++grade) value of grade is incremented and then value present at thataddress is retrieved. (*grade)++ // value is get and then incremented (post increment) ++*grade // value is get and then incremented (pre increment) *++grade //I think this is error... *(++grade) value of grade is incremented and then value present at thataddress is retrieved.Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.