Contoh implementasi pointer ke array di C:

#include<stdio.h>
int main()
{
printf("Welcome to DataFlair tutorials!\n\n");
int i;
double array[5] = {1.1, 2.2, 3.3, 4.4, 5.5};
double *p;
p = array;
printf( "The array is:\n");
for ( i = 0; i < 5; i++ )
{
printf("%0.2f\n", *(p + i) ); // Pointer to an array
}
return 0;
}
christinah muunga