scanf returns a value, so you should make use of this to see how well it worked. This can help avoid uninitialised data when the scanf doesn't work for some reason.
The same applies for output to a file - I tend to sprintf, see how well that went, then use fprintf to write the string to the file.
You forgot the space before the first %c. To make it similar to cin >> f >> s >> char_ke;, it's supposed to be scanf(" %c %c %i", &f, &s, &char_ke )
Did you read the documentation on scanf? Make sure to understand exactly what each character, especially space, does in the format string.