This is a C/C++ programs to do basic operations and familiarize with the concept of 2D arrays.
This a menu-driven program that can perform the following tasks:
- Input and print 2D array.
- Check for different types of 2D arrays.
- Print different types of arrays.
The program starts with this interface:
User is asked for the number of rows and columns of the 2D array to be entered. It then asks whether the elements are to be entered in row-major order or column-major order.
User enters the values of the array one by one. After entering of all the values, final array is displayed. This menu has the options of re-entering the array, going back to the MAIN MENU and terminating the program.
User is shown the different types of 2D arrays and can choose any one using the menu.
After choosing a type, there is a small description of that type. This is followed by 2 options- either to make that 2D array or check whether an array is that type.
Here is an example of checking an array for SPARSE condition: