Which state of matter has neither definite shape nor definite volume?
The gas phase of matter has neither definite shape nor definite volume. It takes on the shape of its container and is compressible, expanding or contracting to fill the space available. Gas particles are very far apart.
The liquid phase, which is fluid like the gas phase, is not compressible because the particles are much closer together than those of a gas. Hydraulic systems work by applying force to liquid which is transferred by the liquid because the volume doesn't compress. Air bubbles in the brake lines of cars are dangerous because the applied force will compress the bubbles before it operates the brake.
The solid phase of matter has both a definite shape and definite volume. Particles in a solid are much closer together than in a gas and, with a few exceptions, somewhat closer together than in a liquid.