Cursos /
C++ Introduction
Working with the Array
Reminder how to access an array by index
main.cpp
Note
Index counting starts from zero, making the first element in a list or array the zeroth element.
Tarea
- Declare a string array with a size of 5;
- Initialize the array with the following values:
- First element: "!";
- Second element: "World";
- Third element: ",";
- Fourth element: "Hello";
- Fifth element: " ".
- Construct the message by arranging the elements of the array in the correct order ("Hello, world!")and then set it to the value of the message variable;
- Output the constructed message.
¿Todo estuvo claro?
Sección 2. Capítulo 7
Contenido del Curso
C++ Introduction
4. Introduction to Program Flow
5. Introduction to Functions
C++ Introduction
Working with the Array
Reminder how to access an array by index
main.cpp
Note
Index counting starts from zero, making the first element in a list or array the zeroth element.
Tarea
- Declare a string array with a size of 5;
- Initialize the array with the following values:
- First element: "!";
- Second element: "World";
- Third element: ",";
- Fourth element: "Hello";
- Fifth element: " ".
- Construct the message by arranging the elements of the array in the correct order ("Hello, world!")and then set it to the value of the message variable;
- Output the constructed message.
¿Todo estuvo claro?
Sección 2. Capítulo 7