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 7866659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:27:57+00:00 2026-06-03T00:27:57+00:00

This feels like a really stupid thing to ask, but I had someone taking

  • 0

This feels like a really stupid thing to ask, but I had someone taking a programming class ask me for some help on an assignment and I see this in their code (no comments on the Hungarian notation please):

void read_dictionary( string ar_dictionary[25], int & dictionary_size ) {...

Which, as mainly a C# programmer (I learned about C and C++ in college) I didn’t even know you could do. I was always told, and have read since that you’re supposed to have

void read_dictionary( string ar_dictionary[], int ar_dictionary_size, int & dictionary_size ) {...

I’m told that the professor gave them this and that it works, so what does declaring a fixed size array like that even mean? C++ has no native way of knowing the size of an array being passed to it (even if I think that might’ve been changed in the newest spec)

  • 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-06-03T00:27:59+00:00Added an answer on June 3, 2026 at 12:27 am

    In a one dimensional array It has no significance and is ignored by the compiler. In a two or more dimensional array It can be useful and is used by the function as a way to determine the row length of the matrix(or multi dimensional array). for example :

    int 2dArr(int arr[][10]){
       return arr[1][2];
    }
    

    this function would know the address of arr[1][2] according to the specified length, and also the compiler should not accept different sizes of arrays for this function –

    int arr[30][30];
    2dArr(arr);
    

    is not allowed and would be a compiler error(g++) :

    error: cannot convert int (*)[30] to int (*)[10]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This feels like a really basic question, but I can't figure it out anyway..
It feels like there must be some semi-simple solution to this, but I just
I feel really stupid for asking a question like this, but I cannot seem
This feels like it should be really easy, but I just can't get it
This feels like a really basic question, but I haven't been able to find
I feel like this might be really simple but I'm just not getting it
I feel like there's a simple solution to this, but I'm not really sure
This feels like it should be pretty simple, but not much seems to be
This feels like the kind of code that only fails in-situ, but I will
OK, this feels like an idiot question, but I'm stuck - I don't know

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.