My own array implementation in C I've been trying to remember old programming concepts like data structures.

My first challenge was about implementing my own array of positive integers:

#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;

int* array_initialize(int size) {
    return calloc(size, size * sizeof(int));
}

void array_set(int *array, int index, int value) {
    array += index;
    *array = value;
}

int array_get(int *array, int index) {
    array += index;
    return *array;
}

int array_size(int *array) {
    int size = 0;
    while(*array != 0) {
        size++;
        array++;
    }
    return size;
}

int main() {
    int* array = array_initialize(5);

    array_set(array, 0, 2);
    array_set(array, 1, 4);
    array_set(array, 2, 6);
    array_set(array, 3, 8);
    array_set(array, 4, 10);

    for (int i = 0; i &lt; array_size(array); i++) {
        printf("Index #%d -&gt; %d\n", i, array_get(array, i));
    }
    printf("\nSize: %d\n", array_size(array));

    free(array);

    return 0;
}


Can I call it an array?

Is it a good starting point? What would you change?

Can I implement my custom array with [] to read/write values to my array?
Your array set could be written as *(array + index) = value; and your array get could be written as return *(array + index);.

array[index] could also be written as *(array + index). Those two functions don't do anything you can't already do with [].