Write a program to create an n-dimensional array on the runtime with the help of pointers. The user will enter on the run time that how many dimensions are required, if user enters 2 as a dimension input, a 2D array will be generated with the number of elements entered by the user until the enter key is pressed.