#include <unistd.h>

void    ft_ft(int *nbr)
{
        *nbr = 42;
}

//
void    display_value(int *nbr)
{
        int             i;  
        char    c;  

        i = 0;
        while (nbr[i] >= 1 && nbr[i] <= 9)
        {
                c = nbr[i] + '0';
                write(1, &c, 1); 
                i++;
        }
}

int     main(void)
{
        int     *ptr;
        int     d;
        d = 1;

        ptr = &d;
        display_value (ptr);
        ft_ft (ptr);
        display_value (ptr);
        return (0);
}

Embed on website

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