We look at the division of 798465 by 40 
We're looking to find how many times 40 goes into 798465.

Going ahead to step 1:
When dividing 7 by 40, we get 0 with a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 7 and we're left with 7.
Append the next digit (9) from the dividend to 7 and continue with: 79 / 40

Advancing to step 2:
40 goes into 79 1 times with a remainder of 39.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Subtracting 40 from 79 leaves us with 39.
Include the next digit (8) from the dividend after 39, then repeat: 398 / 40

Moving on to step 3:
40 goes into 398 9 times with a remainder of 38.
The next digit of our result is 9. 
Result so far: 19.0
Deduct 360 from 398 and we're left with 38.
Fetch the next digit (4) from the dividend, attach it to 38 and continue: 384 / 40

Advancing to step 4:
40 can be fit into 384 9 times, resulting in a remainder of 24.
Put 9 as the next digit of the answer. 
Result so far: 199.0
Subtract 360 from 384 to get 24.
Bring next digit (6) of the dividend behind the 24 and repeat the process: 246 / 40

Going ahead to step 5:
If we divide 246 by 40, we get 6 and a remainder of 6.
Put 6 as the next digit of the answer. 
Result so far: 1996.0
If we subtract 240 from 246, we get 6.
Fetch the next digit (5) from the dividend, attach it to 6 and continue: 65 / 40

Advancing to step 6:
When dividing 65 by 40, we get 1 with a remainder of 25.
The number 1 becomes the next digit in our result. 
Result so far: 19961.0
The remainder is 25 after subtracting 40 from 65.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

On to step 7:
When dividing 250 by 40, we get 6 with a remainder of 10.
Use 6 as the next digit of our solution. 
Result so far: 19961.6
If we take 240 away from 250, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 8:
100 divided by 40 is 2 with a remainder of 20.
Write down 2 as next digit of the result. 
Result so far: 19961.62
Subtract 80 from 100 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Going ahead to step 9:
40 can be fit into 200 5 times, resulting in a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 19961.625
The remainder is 0 after subtracting 200 from 200.
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 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 19961.625
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 11:
40 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 19961.625
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.

The final result is 19961.625 with a remainder of 0.0.