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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:28:21+00:00 2026-06-12T17:28:21+00:00

Possible Duplicate: C: How come an array’s address is equal to its value? C

  • 0

Possible Duplicate:
C: How come an array’s address is equal to its value?
C pointer : array variable

Considering a multidimensional Array:

int c[1][1];

Why all of the following expression points to the same address??

printf("%x", (int *) c);      // 0x00000500
printf("%x", *c);             // 0x00000500
printf("%x", c);              // 0x00000500

How would a pointer’s actual value and it’s derefernced value can be the same?

  • 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-12T17:28:22+00:00Added an answer on June 12, 2026 at 5:28 pm

    Under most circumstances1, an expression of type “N-element array of T” will be converted (“decay”) to expression of type “pointer to T“, and the value of the expression will be the address of the first element in the array.

    The expression c has type int [1][1]; by the rule above, the expression will decay to type int (*)[1], or “pointer to 1-element array of int“, and its value will be the same as &c[0]. If we dereference this pointer (as in the expression *c), we get an expression of type “1-element array of int“, which, by the rule above again, decays to an expression of type int *, and its value will be the same as &c[0][0].

    The address of the first element of the array is the same as the address of the array itself, so &c == &c[0] == &c[0][0] == c == *c == c[0]. All of those expressions will resolve to the same address, even though they don’t have the same types (int (*)[1][1], int (*)[1], int *, int (*)[1], int *, and int *, respectively).


    1 – the exceptions to this rule are when the array expression is an operand of the sizeof, _Alignof, or unary & operators, or is a string literal being used to initialize another array in a declaration

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: C: How come an array’s address is equal to its value? int
Possible Duplicate: C: How come an array’s address is equal to its value? SA
Possible Duplicate: C: How come an array’s address is equal to its value? I
Possible Duplicate: C: How come an array’s address is equal to its value? Could
Possible Duplicate: Return variable with the highest value? I'm trying to come up with
Possible Duplicate: C# Why can equal decimals produce unequal hash values? I've come across
Possible Duplicate: How to sort a NSArray alphabetically? Hi all, I have an array
Possible Duplicate: Modifying C string constants? Pointer to const char vs char array vs
Possible Duplicate: What's the difference between 'int?' and 'int' in C#? I've come across
Possible Duplicate: Sorting a multidimensional array in PHP? $songs = array( '1' => array('artist'=>'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.