C++

Objectives :

  • myArrayPartial1:
    • In partial initialization, the array size should be fetched before runtime
    • the array size should be higher during declaration like
      string str1[7] = {"a", "b", "c" };
      int n1[10] = { 1,2,3,4,5};
  • Code : myArrayPartial1.txt
     

Step: 1 Create a source file.

Step: 2 Edit and save Source file

Step: 3 Runtime Views:

a) Note outputs, as empty spaces  with string and "0s" with integers data arrays, the value in string array at index 5 was an empty space, and the value in  integer array at index 5 was 0.

 

 

Step: