Search:

Type: Posts; User: qny

Search: Search took 0.01 seconds.

  1. Thread: addreaa of array

    by qny
    Replies
    10
    Views
    1,246

    Value and representation are indeed different...

    Value and representation are indeed different things. I know that.

    Imagine for the sake of argument that instead of void* and int* we're dealing with int and long: the value 42 is valid for both...
  2. Thread: addreaa of array

    by qny
    Replies
    10
    Views
    1,246

    Please see 7.21.6.3 and 7.21.6.1 in the C11...

    That is not true.[/QUOTE]

    Please see 7.21.6.3 and 7.21.6.1 in the C11 Standard.

    7.21.6.3 says that the printf() function behaves like fprintf() (described in 7.21.6.1).
    7.21.6.1/8 says that...
  3. Thread: addreaa of array

    by qny
    Replies
    10
    Views
    1,246

    Having a a pointer (or a decayed array) and i an...

    Having a a pointer (or a decayed array) and i an int: &a[i] and a + i are exactly the same thing.
    The only reason to choose either one is stylistic: I prefer the last one.

    Note that, for the...
  4. Thread: addreaa of array

    by qny
    Replies
    10
    Views
    1,246

    Lose the j. Print the address printf("address...

    Lose the j.
    Print the address

    printf("address is %p\n", (void*)(a + i));
Results 1 to 4 of 4