Help required in merge k sorted arrays

can you please tell how to take k arrays dynamically,.Also i am stuck here https://ide.codingblocks.com/s/95781
please help with the coding part