Some scripts had been deleted
This commit is contained in:
parent
0f9f981495
commit
e759db9e6d
@ -1,39 +0,0 @@
|
||||
// THIS DOESN'T WORK
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void supprime(char *s, char c);
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char * chaine = "Salut tout le monde";
|
||||
char c = 'u';
|
||||
supprime(chaine, c);
|
||||
printf("%s\t\t%c\n", chaine, c);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void supprime(char *s, char c)
|
||||
{
|
||||
char * save = s;
|
||||
while(*s)
|
||||
{
|
||||
if(*s == c)
|
||||
{
|
||||
printf("On a une correspondance\n");
|
||||
while(*s && *(s + 1) != '\0')
|
||||
{
|
||||
*s = *(s + 1);
|
||||
s++;
|
||||
}
|
||||
printf("Fin de la boucle : %s", s);
|
||||
*s = '\0';
|
||||
s = save;
|
||||
}
|
||||
else
|
||||
{
|
||||
s++;
|
||||
}
|
||||
save = s;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user