Problem : Declare an array arr of data type spark_t.
First we specify the data type, then the name of the array, then the size in square brackets.spark_t arr;
Problem : Declare a data type spark_t which consists of an array of 100 integers.
Notice the difference between this and the previous problem. In the first problem, we declared a variable and allotted memory for it. In the second one we declared only a data type of which you can later declare variables.typedef int spark_t;
Problem : Prompt the user for an array size and then declare a static array of that size.This is a trick question. The size of a static array needs to be a constant and cannot be decided at run time; it must be available at compile time. Instead, you would need to allocate dynamic memory.
Take a Study Break!