Associative arrays in C++
Associative arrays are also called map or dictionaries. In C++. These are special kind of arrays, where indexing can be numeric or any other data type
i.e can be numeric 0, 1, 2, 3.. OR character a, b, c, d… OR string geek, computers…
These indexes are referred as keys and data stored at that position is called
So in associative array we have (key, value) pair.
We use STL maps to implement the concept of associative arrays in C++.
Now we have to print the marks of computer geeks whose names and marks are as follows
Name Marks Jessie 100 Suraj 91 Praveen 99 Bisa 78 Rithvik 84
The marks of all students are 84 100 99 78 91 the marks of Computer geek Jessie are 100 the marks of geeksforgeeks
Praveen are 99