A square.
No, a cube cannot have an octagonal cross-section.
Rectangle
The cross section of a pyramid shrinks from the shape of the base down to a point as you move along its axis from the base to the apex. The cross section of a prism is constant along its axis.
It is a triangle.
No because it would be smaller.
No, a cube cannot have an octagonal cross-section.
A square
The cross-section of a cube can vary depending on how it is cut. If sliced parallel to one of its faces, the cross-section will be a square. If cut diagonally, the cross-section can be a rectangle or a more complex polygon, depending on the angle and position of the cut.
Infinitely many.
Yes it can.
The cross sectional area of a triangular prism is simply the area of the base. The formula for the area of a triangle in one half base times height. Remember that a triangular prism by definition has a triangle for a base.
Rectangle
Yes, but not a regular one.
It will be the same shape as a square
A cylinder has a circular cross section that is parallel to its base.
The cross section of a pyramid shrinks from the shape of the base down to a point as you move along its axis from the base to the apex. The cross section of a prism is constant along its axis.
The following are some shapes having a square cross section: a cube, a cuboid, a square pyramid.