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.
A hexagon.
No, a cube cannot have an octagonal cross-section.
A square
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.
Infinitely many.
Yes it can.
Rectangle
A cylinder has a circular cross section that is parallel to its base.
Yes, but not a regular one.
It will be the same shape as a square
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 will be one of:a triangle if where the cross section cuts the base is through two adjacent sides;an irregular quadrilateral if where the cross section cuts the base is through two opposite sides but not parallel to a side of the base; ora trapezium if where the is the cross section cuts the base is parallel to a side of the base.
The following are some shapes having a square cross section: a cube, a cuboid, a square pyramid.