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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:32:08+00:00 2026-05-31T00:32:08+00:00

When x is a L-value (let’s say a variable), then the following identity holds:

  • 0

When x is a L-value (let’s say a variable), then the following identity holds:

x == *(&x)

This is quite easy to explain, because &x is a pointer to x and the dereference operator * applied to &x will then of course return x.

Now I am wondering if the converse makes sense. To be precise I am wondering if

p == &(*p)

when p is a non-dangling pointer.
This seems to make sense, because *p is itself a L-value (a value which has an adress), because we already have the pointer (=adress) p to it. So you only need to know, that such pointers are unique, because then &(*p) has no other chance as to be p.

So when both identities are true you can say, that, mathematically, * and & are inverse functions of one another.

Am I correct? Are there any possible exceptions to this alleged rules?

  • 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-31T00:32:10+00:00Added an answer on May 31, 2026 at 12:32 am

    When p is an object pointer, &*p is equivalent to p. The evaluation of *p doesn’t occur and this is guaranteed by the C Standard.

    char *q, *p = NULL;
    q = &*p;  // equivalent to q = p;
    

    Here is the relevant paragraph of the Standard:

    (C99, 6.5.3.2p3) “If the operand is the result of a unary * operator, neither that operator nor the & operator is evaluated and the result is as if both were omitted, except that the constraints on the operators still apply and the result is not an lvalue.”

    EDIT: After @ldav1s comment, I changed the word pointer to object pointer. Indeed if p is of type void *, then &*p is invalid. For information, this has been discussed by the C Committee in Defect Report #102: http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_012.html

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

Sidebar

Related Questions

Let's say I have this url: www.example.com/test.php?page=4 How do i retrieve the value of
Let's say I have an int with the value of 1. How can I
Let's say I have a TextBox with the value 1000000 . How can I
Let say i have a field 'category' with the value '1|2|3'. I want to
Let's say I have a web page that currently accepts a single ID value
Why won't Java let me assign a value to a final variable in a
I have a BigInteger value, let's say it is 282 and is inside the
Let's say I've got: Dim los1 as New List(Of String) los1.Add(Some value) Dim los2
Let's say I have the following database table: record_id | record_date | record_value -----------+-------------+--------------
I have a div with border-radius set to some value (let's say 10px), and

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.