
Simple code
By: a guest on
Oct 26th, 2012 | syntax:
C | size: 0.47 KB | hits: 79 | expires: Never
#include <stdlib.h>
#include <stdio.h>
extern void subs (char *string, char this_c, char that_c) ;
int main (int argc, char *argv[])
{
char this_c = 'e';
char that_c = 'X';
char orgstr[] = "sir sid easily teases sea sick seals";
for (i:orgstr)
{
if(i == this_c)
{
i = that_c;
}
}
printf("Changed string: %s\n", orgstr);
exit(0);
}