C++ Arrays : nested , array within array

Objectives :

  • myArrayTwoD1.cpp
    int n1[] = { 1,2,3,4,5,6,7,8,9 };
    string str1[6] = {"A","B","C", "D", "E", "F" };
  • Here two different arrays are used in a for-loop, and a nested-for loop.
  • Creating two dimensional Array with different data types.
  • code: myArrayTwoD1.txt

Step: 1 Create a source file.
 

Step: 3 Edit and save Source file

Step: 3 Runtime Views: Since the outer array would process only 6 elements , therefore the last number in Integer Array Element, won't be printed or accessed.

Step: