a box is sliding across the floor from left to right. which diagram correctly shows the force of fiction acting on the box?

Friction in this case will act counter to the direction of the box's movement. The box moves left to right, so the force of friction acts in the opposite direction. (D)
Answer: Hello there!
first, we have two notions of the force of friction:
The force of friction is in the opposite direction of the motion direction.
It acts in the contact point between the objects.
Then if the box is moving from left to right, the friction force should point from right to left, and be in the bottom of the box (the contact point between the box and the floor).
The diagram that shows this is the D.