When they are bonded to hydrogen that is $\ce{HOCN}$ $\ce{HNCO}$. The two compounds will be different . ![enter image description here](https://i.sstatic.net/AkjFb.png) From [Wikipedia](https://en.m.wikipedia.org/wiki/Cyanate) >Organic cyanates are called isocyanates when there is a C−NCO bond and cyanates when there is a C−OCN bond. Due to resonance after deprotonation the two anions will be the same.![enter image description here](https://i.sstatic.net/bkNn6.png)