You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
331 B

#include <stdio.h>
#include <string.h>
#include <malloc.h>
void swap(char**,char**);
int main( int argc, char **argv)
{
char * a = "Coucou";
char * b = "Pas Coucou";
printf("a : %s || b : %s\n",a,b);
swap(&a,&b);
printf("a : %s || b : %s\n",a,b);
}
void swap(char **a, char **b)
{
char * temp = *a;
*a = *b;
*b = temp;
}