In the figure shown, find the tension T in the string if the system is in equilibrium.
A block of mass M is pulled on a smooth horizontal table by a string making an angle θ with the horizontal as shown in figure. If the acceleration of the block is 'a', find the force applied by the string and by the table on the block.