I recall one of a number of examples many years ago of a chap who ate prodigiously throughout his adult life and had a 5 course meal the night before he was taken ill.
He fasted with complete rest and if my memory serves me correctly, for 40 days.
Just to make sure he didn't have any residual fecal matter left in his colon, he had read about the use of an enema towards its end and decided to have one from a trained and qualified nurse. To their surprise and amazement only slightly darkened liquid came out with no solids at all. He underwent another enema and the same thing occurred.
This and other accounts convince me that fecal matter and digested/undigested foodstuffs that remain in the colon are utilized during the fast as fuel or eliminated as waste. Bowel movements can also occur during a fast if the body deems it best to rid itself or effluent material in this way, but for the most part they shutdown.