The correct option is D ±1√2
Since, the magnitude of a unit vector=1.
If we have a unit vector
−−→AB=a^i+b^j+c^k
then its magnitude
AB=√a2+b2+c2=1
Therefore, as per the question data
OA=√(12)2+n2+(12)2=1
Solving we get, n=±1√2
Hence, option (C) is the right choice.