When the string (of length $l$) connecting the bob (of mass $m$) of a pendulum makes an angle $\theta$ w.r.t the vertical, its total energy is given by $$E=\frac{1}{2}ml^2\dot{\theta}^2+mgl(1-\cos\theta)=\text{constant}$$ Now, imagine a situation, a thought experiment, in which gravity is instantaneously switched off. Here are the following questions.
What happens to its potential energy? I mean, does it become zero because $g=0$? If yes, what happens to the conservation of energy?
Although, now there is no force due to gravity on the bob, there is an inward string tension. How will the motion of the bob change?