modulo, how it works

This is a theoretical question from a software amateur.

I have a float variable x=111.01 and I want to capture the whole and fractional parts into integer variables.

One way I have seen this done is to multiply x by a number, say, 100.

x=x*100; //now x = 11101

and then use integer variables whole and fract...

whole = x/100; //now x=111, which is the whole portion fract = x % 100;

The problem I see here is that x % 100 will return 1, not 0.01

Is there a flaw in my interpretation? How does one manage the issue of the decimal?

One thought: You could know up front there will be 2 digits after the decimal, and if modulo returns a single digit, you would have to insert a 0 in front of the result. Is this what is typically done?

0.01 (1/100) is the correct answer.
There is no flaw in your reasoning.
If you want the leading zero, (.01), you need to do a little more arithmetic. (Hint: 1/10 )

Getting the integer portion is usually done like: int whole = x;

The fractional part is then multiplied by some value - typically 10, 100, or 1000, depending on how many digits you want in the result. Then, the value is printed with that number of digits, adding leading zeros as required.