Yes, sugar and salt are solids.
As we know that solids are rigid and have a fixed shape and volume.
i. It is given that sugar and salt when kept in jars, take the shape of the jar.
ii. But each granule of salt and sugar remain in their fixed shape and volume.
iii. The shape and volume of each granule do not change at all. Hence, they are solids.