Greeting is the first step to form a culture, because people begin to communicate with others. The individuals become a community.
In China, how do we Chinese each other? It's a bit different, I mean the content. For example, if we meet a friend in the street, we are used to say: “Hi, nǐ chī le ma? or chī guò fàn le ma?” or “nǐ qù nǎ li = Where are you going?”.
Some westerners might feel awkward or not comfortable by being asked those questions. Because as I understand, it's kind of related to the privacy. So if you come to China. And people ask you "where are you going"?. Please don't feel strange or upset, it's just a way of greeting here, and has nothing to do with interested in your privacy.
Actually, the answer is very simple. Just say "chī le = already ate or wǒ qù gōng zuò = I am going to work". Those answers are good enough.