Westonci.ca is the premier destination for reliable answers to your questions, brought to you by a community of experts. Get detailed and accurate answers to your questions from a community of experts on our comprehensive Q&A platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

There is a group of n children standing in a queue, where their ages are listed in the array A[ ]. The children are standing randomly in the queue. Most probably, their ages in the array A[ ] are randomly listed too. For each child, you are required to search for the next older child in the queue and to print the difference of their ages. Print all the outputs in an array Out[ ].