Guest User

Untitled

a guest
Oct 22nd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1.  
  2. 2. Note: This program is about concepts, no GUI’s are required here. Spend your time making sure you understand the concepts of memory and addressing, not GUI making.
  3. 3. Write a program that declares a 2 dimensional array of integers of size 10 by 10.
  4. 4. Load the array in a row major fashion so that at array position 0, 0 the number 0 resides, at the array position 9, 9, the number 99 resides.
  5. a. For the load you can access the array using conventional array syntax
  6. i. Example: IntArray[row][col] = x;
  7. 5. Make a function that allows the user to print out a row of the array.
  8. a. Use pointer arithmetic to print the data.
  9. b. The program will print the contents of the selected row, starting at column 0 and finishing at column 9.
  10. 6. Now make a function that allows the user to select a column of the array to print out.
  11. a. Use pointer arithmetic to print the data.
  12. b. The program will print the contents of the selected column, starting at row 0 and finishing at row 9.
Add Comment
Please, Sign In to add comment