You are on page 1of 2

Week 11 FUNDAMENTAL PROGRAMING BSCS –Z

TOPIC: Array

Following Lab task done during online classes

Program #1

write a program in c++ that demonstrate the use of array and also use a string
and integer variable to display data in array.

C++ Arrays

Arrays are used to store multiple values in a single variable, instead of declaring
separate variables for each value.

To declare an array, define the variable type, specify the name of the array
followed by square brackets and specify the number of elements it should store:

Program #1: write a program in c++ that demonstrate the use of array and also
use a string and integer variable to display data in array.

Example 2: fruits name


Example 3 with integer variable data type

You might also like