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

  • Home
  • SEARCH
  • 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 1041419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:21:01+00:00 2026-05-16T15:21:01+00:00

In C, when we access a[i][j] using pointers why do we need the second

  • 0

In C, when we access a[i][j] using pointers why do we need the second * in *(*(a + i) + j)? Using printf() I see a + i and *(a + i) print the same value.

  • 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-16T15:21:01+00:00Added an answer on May 16, 2026 at 3:21 pm

    a + i is a pointer to the i‘th subarray. If you dereference it, you get an lvalue to the i‘th subarray, which decays to a pointer to that array’s first element. The address of an array’s first element and that of its array is the same.

    The dereference is needed to make + j calculate with the correct element byte-width. If you would not dereference, then instead of getting T* you would get a T(*)[J] pointer that you add j to, which together with i advances into memory pointing to (a + i + j) instead (advancing by sizeof(T[J]) instead of sizeof(T)).

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

Sidebar

Related Questions

Need to query my SQL server from Access using an ADO connection (for example),
I want the value of JavaScript variable which i could access using PHP. I
Using Access 2003 I want to get a table value from the two databases
Using Access 2003 Table1 ID Name Value 001 Raja 100 002 Ramu 200 004
I need a little bit of help with using pointers in C++. Sorry to
I'm curious as to the difference of denying access using the global $_server['http_referer'] and
Is there better use of available storage space and faster network access using the
I've been writing a multi-threaded DLL for database access using ADO/ODBC for use with
Any ideas why on some links that I try to access using HttpWebRequest I
Using Access 2003 In my table column, some of the fields are null, some

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.