What is the difference between an external iterator and an internal iterator?



What is the difference between an external iterator and an internal iterator?..

Answer / Anjali Devi

"External iterators are a type of iterator that operates on containers outside of their implementation, allowing them to be used with different types of data structures without requiring changes to the code. They have access only to the container's elements and no knowledge of its internal representation.nnInternal iterators, on the other hand, are a type of iterator that has direct access to the container's implementation details, such as pointers or references to the container's data structure. This can lead to more efficient iteration but also means they are not portable across different container types."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What does the nocreate and noreplace flag ensure when they are used for opening a file?

1 Answers  


What does iomanip mean in c++?

1 Answers  


Explain the need for "Virtual Destructor"?

2 Answers   Infosys,


What is operators in c++?

1 Answers  


What is an Iterator class?

1 Answers  


What is do..while loops structure?

1 Answers  


What you mean by early binding and late binding? How it is related to dynamic binding?

1 Answers  


What is c++ mutable?

1 Answers  


How would you stop a class from class from being derived or inherited?The constructer should not be Private,as object instantiation should be allowed.

15 Answers   Satyam,


Define whitespace in C++.

1 Answers   HCL,


What is the difference between a declaration and a definition?

1 Answers  


Where must the declaration of a friend function appear?

1 Answers  


Categories