Neck pain with shoulder pain can be early sign of cervical spondylosis
Get yourself examined from an Orthopaedic surgeon
Posture correction,Adequate sleep,daily exercise and stress management should help you come out of it
Since you are an IT professional, the pain is very common. Confirming your neck pain as CS or due to some other reason will require (a) Imaging (X-ray or MRI) ; (b) Therapeutic Tests. since those are not possible via the current medium. therefore i request you to visit nearest Occupational Therapy Provider / workspace ergonomist / physiotherapist.
There are few Tips That can prevent the pain:
1> Take Intermediate rests after 40-45 minutes of work (a.k.a. micro-breaks)
2> Adjust your work place properly working in an ergonomic setting reduces neck and shoulder pain by 80-90% in professionals working with computers. (consult your Occupational therapist for the same)
3> while using mobile devices keep it up
4> Correct your posture by simply standing besides a wall with heel, hips, shoulder blades, and straight bony part of head touching the wall for atleast 5 minutes. at starting it may be difficult so keep it short and gradually increase the duration.
Consult nearest Service provider and follow the 4 advices given that should make a huge difference.
USE A COMFORTABLE BED and POSTURE FOR SLEEPING and SLEEP FOR GOOD 8 HOURS. STAY HEALTHY