According to the law of constant composition or definite proportions; irrespective of the source a chemical compound it is always found to be made of the same elements combined together in the same fixed proportion by mass. Thus, in the light of the above law, it will be a pure substance. It is because sugar obtained from different sources like sugarcane and beetroot will have the same composition.