---
id: 647e21eb8acb466c97ccbeea
title: Guided Project - Develop foreach and if-elseif-else Structures to Process Array Data in C#
challengeType: 19
dashedName: guided-project-develop-foreach-and-if-elseif-else-structures-to-process-array-data-in-c-sharp
---

# --description--

This challenge will be partially completed on Microsoft's learn platform. Follow these instructions to complete the challenge:

1. Go to <a href="https://learn.microsoft.com/en-us/training/modules/guided-project-arrays-iteration-selection/" target="_blank">https://learn.microsoft.com/en-us/training/modules/guided-project-arrays-iteration-selection/</a> and complete all the tasks for the "Guided Project - Develop foreach and if-elseif-else Structures to Process Array Data in C#" module. This is required to earn the "Create and Run Simple C# Console Applications" trophy.
1. When you are finished, come back and correctly answer the question below.

# --question--

## --text--

A developer writes an application that uses a `foreach` loop to iterate through an array containing 20 elements. After the application is complete, the developer learns that the array must be updated to include 40 elements. The application needs to examine all 40 array elements. Which of the following items describes the required code update?

## --answers--

Create a second `foreach` loop that iterates through the additional items.

---

No changes are required to the `foreach` loop.

---

Place the original `foreach` loop inside the code block of a second `foreach` loop that iterates twice.

## --video-solution--

2
