Write a Program in C That Array Name is the Same as the Address of the Array’s First Element

// Array name is the same as the address of the array’s first element.
#include <stdio.h>

// function main begins program execution
int main( void )
{
   char array[ 5 ]; // define an array of size 5

   printf( "    array = %p\n&array[0] = %p\n   &array = %p\n",
      array, &array[ 0 ], &array );                           
} // end main

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...