Can i use an iphone charger on samsung galaxy note 10.1?

The cable looks exactly the same. Can I use Iphone charger on Note 10.1 or Note 10.1 on Iphone

Short answer:
Yes, but it will be a slow charge, especially if it is on.

Two reasons for that. 1) USB is normally current-limited, meaning devices are not supposed to pull a lot of power without permission. Apple and Samsung use different methods of checking, so an Apple cable/charger will charge the note slowly. 2) an iphone charger is weaker than a tablet charger and can only provide half of what the device wants, even with the right cable.