We use pair class for array

we use pair class for array…

What is your doubt? Please elaborate.

i ask one thing that .

are we use pair class like pair<int,int> pi; such thing for creating an array.

if yes then how …

Yes you can create an array of pair.
Like for creating an array of integer ,you declare
int arr[10]

So for array of pairs,
pair<int,int> arr[10]
This will create an array of pair of size 10

1 Like

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.