The book published that in the programming language SI - " The name of the array is the same as the address of its first element " and an example is given below:

#include <stdio.h> #include <stdlib.h> main() { char array[5]; printf(" array = %p\n&array[0] = %p\n", array, array[0]); } 

I have completely different addresses are displayed. What is the error, or it depends on the compiler. Task performed on Win 7 x64, DevC ++

  • Thank you, throw back, I'll close. - Stee1House


1 answer 1

The '&' character (this means the address) is array[0] before the array[0] .