What significant justification is there for the -> operator in C and C++? Soluti
ID: 3608055 • Letter: W
Question
What significant justification is there for the -> operator in C and C++?Explanation / Answer
in c and c++ we use this operator called arrow operator -> toaccess the data members of data structures declared in c andc++ for ex in given structure struct example { int a; int b; }c; we can access the members a and b of structure example by thecommand c.a and c.b but while using data structures in c and c++ where the structurevariable declared is *ptr we use ptr->a and ptr->b for ex struct example { int a; int b; }*ptr; here we access the members a and b using the arrow operator likeptr->a and ptr->b
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.