Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 414225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:15:43+00:00 2026-05-12T18:15:43+00:00

I am having trouble wrapping my head around the concept of an array with

  • 0

I am having trouble wrapping my head around the concept of an array with more than two dimensions, why you would need one, and how you would use it.

For example, how would you go about representing the following data in a multidimesional array?

Sex: Male | Female
Hair Color: Blond | Brunette | Black
Eye Color: Blue | Brown | Green | Hazel

Instinct is telling me that I should create an array as so:

string[,,] personAttributes = new string[2,3,4]

Please show how you would you fill up this array without a loop, and then with a loop. Any expansion on concepts and usage appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:15:43+00:00Added an answer on May 12, 2026 at 6:15 pm

    I’m not going to touch your personAttributes example because I don’t think a 2D array is a good idea, let alone 3D (personally I would use an array of structs).

    However, multidimensional arrays are very useful when you have some kind of orthogonal data space (i.e. you have several “choices” which are independent of each other).

    For instance, if you’re storing the response times of 20 people over 10 tests, where each test is repeated 3 times, and the whole thing is done once a month for 12 months, you might have an array like this:

    double[,,,] responseTime = new double [12,20,10,3];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a bit of trouble wrapping my head around this one. I'm sure the
I'm having trouble wrapping my head around more advanced Rails query methods. In this
I'm having trouble wrapping my head around how I would return a list of
I'm having trouble wrapping my head around this, and would love some guidance. I
I'm having trouble wrapping my head around how to write this query. A hypothetical
I'm having trouble wrapping my head around how to do this. I have a
I am having some trouble wrapping my head around this function: var toStr =
I am having trouble wrapping my head around how to make a Dojo Deferred
I'm having trouble wrapping my head around how to set this up. I have
Having a bit of trouble wrapping my head around Qtimer this morning. Here's the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.