In what scenario would using an array of structures be more beneficial than using multiple arrays?

  • When data access patterns are unpredictable
  • When dealing with unrelated data
  • When each element has multiple attributes
  • When memory efficiency is not a concern
Using an array of structures is advantageous when dealing with related data that share the same attributes or fields, making it more organized and efficient compared to multiple arrays.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *