Aside from last names, diet is a big giveaway. If someone is vegetarian, it is highly likely that they come from the so called "upper" castes. In certain interpretations of Hinduism, which are now becoming the dominant ones in India, meat is considered polluting. If you eat meat, you are dirty, and this "dirtiness" is at the root of why some castes are still considered untouchable.