If I purchase BTC by cash from unidentified person (found at localbitcoins.com) and deposit it directly on my cex.io address, am I violating terms of use?
I already read cex.io/terms but it's not clear if there is any issue with this specific activity.
I would say that you must first create account in a trusted wallet then go to the localbicoins and buy bitcoin with some vendor that has account verified. Ask for documents or anything that proves that this person from localbitcoin really exists in real life. After you buy bitcoins, send those bitcoins to your wallet and after make deposit in your cex.io account. This way you make sure that you will not have problems in the future. Always follow these steps I told you. If one day you are accused of anything, you can show the provenance of bitcoin.
When it comes to their terms funds should be on legal source and as said any exchange wont really have that time to make such verifications so basically it wont really matter most of the time.