diff --git a/Corrections/Correction_C.c b/Corrections/Correction_C.c index d5643f1..cd3bf48 100644 --- a/Corrections/Correction_C.c +++ b/Corrections/Correction_C.c @@ -56,7 +56,7 @@ int main() // FIXME: Array // create a new string array called "shoppingList", with three elements of your choice. Create an int variable containing the number of // elements in "shoppingList" (using a function of the array/using the array) - char *shoppingList[3] = {"milk", "a Chevy Camaro", "a life"}; + char *shoppingList[3] = {"milk", "a Chevy Camaro", "a life", NULL}; const int nbOfElements = numberOfElements(shoppingList); // FIXME: For-loop - Integer @@ -67,8 +67,14 @@ int main() // FIXME: For-loop - shoppingList // Create a for loop that iterate through "shoppingList" and prints each element with "You have to buy (elemt)". - for (int j = 0; j