#include <stdio.h>
#include <unistd.h>

void ft_rev_int_tab(int *tab, int size){
    int i = 0, j = 0;
    int s1[size+1];

    while(i < size){
        s1[i] = tab[i];
        i++;
    }
    
    i = size -1;
    while (i >= 0){
        tab[i] = s1[j];
        j++;
        i--;
    }   
    i = 0;
    while (i < size){
        printf("%d ", tab[i]);
        i++;
    }
}


int main() {
    int a = 5;
    int str[] = {1,2,3,4,5};

    ft_rev_int_tab(str, a);

    return 0;    
}

Embed on website

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