#include <stdio.h>

int main() {
    int arr[5] = {10, 20, 30, 40, 50};
    int *p = arr; // Il nome dell'array è un puntatore al primo elemento

    printf("Accesso agli elementi dell'array tramite puntatore:\n");
    for (int i = 0; i < 5; i++) {
        printf("Elemento %d: %d\n", i, *(p + i)); // Accesso tramite puntatore
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: