Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Which of the following will be used to access the two entries, namely key and value of the map?

  Shared By: Binge Fischer    Date: Apr 21    Category: C++ Programming    Views: 870

Answer:

Consider ‘i’ is an iterator that accesses the elements of a map. Which of the following will be used to access the two entries, namely key and value of the map?

Options

a) i.first, i.second
b) (*i).first, (*i).second
c) *i.first, *i.second
d) *i.first, (*i).second

Answer : b) (*i).first, (*i).second

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: