C and C++ Programming Resources | C & C++ Code Example Index





The C++ Array and Pointer Sample Codes Index Page


The following links demonstrate the C++ program examples on two aggregate types which are array and pointers. Pointers is another C++ important construct that optimized the used of computer resources such as memory and provide a very efficient way to manipulate the computer memory or storage which is limited, though it is quite difficult to understand and very easy to be misused. In real C++ programming, pointers are explicitly used as can be seen in drag and drop features of the GUI programming.


C++ Arrays Code Samples

  1. Sorting a given list ascendingly using an array type C++ code example

  2. Sorting strings read from standard input, stored in 2D array C++ program example

  3. The multiplication of two matrices using array type C++ source code example

  4. Calculating the average of all the element in array C++ program example

  5. Printing 3x3 array subscripts and their respective elements C++ code sample

  6. Finding the smallest integers in the given range using array C++ code example

  7. To find the total of an array element C++ code sample

  8. A very simple C++ array program example demonstrating character and string


C++ Pointers Code Samples


  1. Finding the sum of an array y by passing an array to a function using pointer C++ code example

  2. Passing a pointer (memory address) to a function C++ code sample

  3. Displaying array elements and their respective memory addresses C++ program example

  4. To compute the average of an arbitrary number of temperatures read from standard input C++ program example

  5. How to change the value of a pointer variable C++ source code example

  6. Determining a smaller integer from the two given integers using pointer to a function and if statement C++ code sample

  7. The relationship of an array, pointers and command line arguments in C++ programming

  8. How to pass a pointer to an array to a function C++ program example

  9. Displaying pointers variable data C++ code sample


C and C++ Programming Resources | C & C++ Code Example Index | C Code Example Index