Doubt regarding list

by using (*it) iterator we are traversing list but pointer should point the node in the list so how (*it) is giving us data it should be (*it).data ??

No it is an stl list. And in this , you can access the element by using (*it)…that is by dereferencing the iterator.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.