Untitled

mail@pastecode.io avatar
unknown
plain_text
14 days ago
651 B
4
Indexable
Never

void    ft_swap(int *a, int *b);
{
        int     c;
        c = *a;
        *a = *b;
        *b = c;
}

#include <stdio.h>

int     main(void)
{
        int     a;
        int     b;

        a = 0;
        b = 42;
        printf("a: %i\nb: %i\n", a, b);
        ft_swap(&a, &b);
        printf("a: %i\nb: %i\n", a, b);
}
~                                                                                                        
~                                                                                                        
~                                                                                                        
~       
Leave a Comment