C++  Implicit and Partial Array, using Quincy

Objectives :

  • myArrayPartialImplicit2.htm
    • Arrays are indexed. The lower index is 0, and can't be negotiated by the users.
    • The scope or limit is stretched from 0 to a decisive integer like 8 or 10.
    • In partial initialization, the array size should be fetched before runtime , it creates some additional space beside the number of initialized array elements.
      • the array size should be higher during declaration like
        string str1[7] = {"a", "b", "c" };
  • Array size and scope should not over shoot during the run time. Calling an array member with index str1[8] in the above format, will push the routine out of context ( not registered in the memory) and there will be a run .
  • code : myArrayPartialImplicit2.txt

Step: 1 Create a source file.

Step: 3 Edit and save Source file

Now let us build this project.

Note, the loop will run for 7 times, and fetch a string array object defined with 4 elements. The empty string does not need any reference or memory location,

Step: 3 Runtime Views: Note when you enter a higher index number which is out of scope of the current array object, there will be a runtime error.

 

Step: