Different shape of bent up bars and cranks are provided in the slab and other structural members. Bars are bent near the supports normally at an angle of 45°. The angle bent may also be 30° in shallow beams where the (effective depth < 1.5 breadth).
In the above image, you can see how the bent up bars are provided in the slab. The slab is supported at two ends. The maximum tensile stress that is positive moments (sagging) acting in the middle of the slab and the maximum compressive stress that is negative moments (hogging) acting at both ends of the support. So bottom steel is required at the mid-span and top steel resists negative moments at the supports. A bent-up bar called a crank bar is provided to make RCC slab safe from compressive stresses.
When bent up bars are provided, the strength and deformation capacity of slabs with bent up bars compared to slabs without bent up bars is sufficiently increased.
So crank bars are generally provided
1- To resist the negative bending moment (hogging).
resist shear force which is greater at supports.
3- To reduce the risk of brittle failure of slab-column connection.
4- To reduce the amount of steel used.
5- For the economization of materials.