We look at the division of 338208 by 40 
The aim is to understand the frequency of 40 in 338208.

Moving on to step 1:
3 divided by 40 is 0 with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Take the next digit (3) from the dividend and append it to 3, then repeat: 33 / 40

Moving on to step 2:
If we divide 33 by 40, we get 0 and a remainder of 33.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 33 after subtracting 0 from 33.
Fetch the next digit (8) from the dividend, attach it to 33 and continue: 338 / 40

On to step 3:
338 divided by 40 is 8 with a remainder of 18.
Record the quotient 8 as the next digit in the result. 
Result so far: 8.0
The remainder is 18 after subtracting 320 from 338.
Take the next digit (2) from the dividend and append it to 18, then repeat: 182 / 40

On to step 4:
182 divided by 40 is 4 with a remainder of 22.
Use 4 as the next digit of our solution. 
Result so far: 84.0
The remainder is 22 after subtracting 160 from 182.
Bring next digit (0) of the dividend behind the 22 and repeat the process: 220 / 40

Moving on to step 5:
When dividing 220 by 40, we get 5 with a remainder of 20.
Use 5 as the next digit of our solution. 
Result so far: 845.0
Deduct 200 from 220 and we're left with 20.
Append the next digit (8) from the dividend to 20 and continue with: 208 / 40

On to step 6:
When dividing 208 by 40, we get 5 with a remainder of 8.
The next digit of our result is 5. 
Result so far: 8455.0
Subtracting 200 from 208 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Advancing to step 7:
40 can be fit into 80 2 times, resulting in a remainder of 0.
Write down 2 as next digit of the result. 
Result so far: 8455.2
If we subtract 80 from 80, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 8:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 8455.2
If we take 0 away from 0, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 9:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 8455.2
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

After the division, we end up with 8455.2 and a remainder of 0.0.