Actividad de Bienvenida. Programación II
jaorduz
6,126 views
Contents
An array is a collection of...
which are the same...
Arrays
those elements can be related by different operators through the index. An example (it must be corrected) of an array:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
int main() {
int myArray[5]={-10, -5, 0 , 5, 10}; i;
for(int i =0;i<=4;i++){
suma = myArray[i];
}
printf("Result = ", suma);
return 0;
}
Check the previous code in order to find the 0, not the last value in the array.
Go Up
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.