How to use and format strfilter?

Hello everyone, currently i am working on a C language program that creates a random string of character and i put them in an array, and my second array has a user type in any characters as well as another array that contains a replacement character. Im trying to use strfilter so that i can replace all the characters the user typed in with the replacement character in my first array. But its not working. Am i just formatting it wrong? or what else can be the problem.
this is how im writing it:

char strfilter= printf(s1, s2, c);

the error says that im missing a ";" which i dont see missing.
any help would be appreciated!

Heres my code if it helps:
#include <stdlib.h>
#include <stdio.h>

int main (void)
int i=0;
int num;
char letter;
char s1[40];
char s2[21];
char c[2];

while (i<40)
printf ("%c", s1[i]);

printf ("\n");

printf ("Enter a string");

printf ("Oh right! Now enter a replacement character");
gets (c);
puts (c);

char strfilter= printf(s1, s2, c);

system ("pause");
return 0;
Topic archived. No new replies allowed.