Can you look at cocaine and know if it is cocaine?

Unless it's analytically tested in a laboratory, you can't know for shure. Cocaine is always cut by dealers to increase their profit, and although harmfull adulterants such as strychnine and rat poison have been proven to be urban myths, Cocaine being cut with a wide range of less harmful substances is basic reality.

Cocaine is most often adulterated with local anesthetics such as Lidocaine, Benzocaine or Procaine because Cocaine it itself a local anesthetic and many people think that when they have a white powder with strong local anesthetising effects it must be Cocaine (even though it's just as if not more likely to be Lidocaine).

Other adulterants Cocaine is often cut with are bulking agents such as Mannitol, Inositol and Dextrose which have a somewhat simmilar texture to Cocaine but are much cheaper and freely available but add a lot of weight and bulk to it, thus doubling or tripling the effective amount a dealer can sell (since Cocaine is always sold in volumes of weight).

Also often used as adulterant are other, more cheaper stimulants such as caffeine and sometimes amphetamine.