bitwise operators – I Don’t Understand how this C Code Works?

Can Anyone explain me how the Negation of “scanf” and “Printf” is done ,And only two Inputs are valid i.e, scanf and printf else compiler is throwing error, scanf and printf return No of inputs and No of character respectively i.e, integer type but still i don’t understand how scand and printf both complement’s complement could be “ffffffff”,this is the output of the program.

”’

#include <stdio.h>

int main(void) {
    // your code goes here
    int x;
    x = ~!scanf("Saumya");
    printf("%x",x);
    return 0;

}

”’