C++ Data Type Array Pointer

C++ examples for Data Type:Array Pointer

Description

Click the following links for the tutorial for Data Type and Array Pointer.

  1. The equivalence of pointers and arrays
  2. Using a Pointer with an Array
  3. Access array element by using pointer
  4. Display the contents of an array using pointer arithmetic
  5. Increments a pointer through a character array.
  6. Increments a pointer through an integer array.
  7. References both array and pointer using subscripts
  8. Illustrates changing a character string using pointer


  9. Use pointer notation and reference pointers as arrays with array notation.
  10. Prints strings pointed to by an array.
  11. Moving along array element by Using Pointer Arithmetic
  12. Using subscripting and pointer notations with arrays.
  13. Use a for statement to print the elements of array 'values' by subscripting the pointer to the array.
  14. Use a for statement to print the elements of array values using pointer/offset notation with the array name as the pointer
  15. Use a for statement to print the elements of array 'values' using pointer/offset notation
  16. Write two separate statements that assign the starting address of array 'values' to pointer variable 'vPtr'


  17. Use a for statement to print the elements of 'values' using array subscript notation
  18. Refer to the 5th element of 'values' using array subscript notation, pointer/offset notation with the array name as the pointer.
  19. What address is referenced by vPtr + 3? what value is stored at that location
  20. Point vPtr to values[4], what address is referenced by vPtr -= 4? What value is stored at that location?
  21. Using an array of pointers
  22. Sorts an array using pointers
  23. An array of pointers to strings
  24. Array name is the pointer to the array
  25. Access array subscripts with pointers
  26. Access next array element by add one to array pointer, *(arrayName + i)
  27. Accessing each array element with the increment operator on its pointer.
  28. Continue adding array elements while the address in array pointer is less than or equal to the address of the last array element.
  29. Determine the output of the following program: two dimensional array and pointer