What kind of food is appropriate for a 4 year old child having diarrhea?

Several. I find apple sauce (never juice), bananas, steamed rice, pasta noodles (macaronior spegetti) all good early foods that help a kids loose stools firm up. Avoid all juiices or fatty foods until firmer stools return. Graham crackers and simple cerials are helpful as are bread products.