It (array) will be useful for you if you don't want to initialise tones of variables. For example: instead of using two int variables we can create one int array, which will store two int values.
//instead of using it:
int a = 2;
int b = 4;
//we can use it:
int array[2] = {2, 4};
Syntax:
typeOfVariable anyNameYouWant[emountOfValuesToStore] = {vars};
No comments:
Post a Comment