please some explain an array and.loop | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

please some explain an array and.loop

25th Jul 2021, 6:05 AM
`IBRAHIM UMAR UBA
`IBRAHIM UMAR UBA - avatar
6 Answers
+ 1
An "array" is a collection of data with a staring index as 0 and a "loop" can be used to access each data of the array. (A loop is basically for iterating over something) example: arr[int] = {1,2,3} for(int i=0; i<size(arr); i++) print(arr[i]) output: 1 2 3 (for more technical answer, please google it yourself or grab the course from here)
25th Jul 2021, 7:15 AM
Rohit Kh
Rohit Kh - avatar
+ 1
Nope, just an example pseudocode to give some basic idea. BTW thanks for adding the working C code here. :)
25th Jul 2021, 7:54 AM
Rohit Kh
Rohit Kh - avatar
+ 1
Okay thank you all
25th Jul 2021, 7:55 AM
`IBRAHIM UMAR UBA
`IBRAHIM UMAR UBA - avatar
0
You all nice and good
25th Jul 2021, 7:57 AM
`IBRAHIM UMAR UBA
`IBRAHIM UMAR UBA - avatar
0
But i have another question on two detentional arrays and multiple and matrix
25th Jul 2021, 8:06 AM
`IBRAHIM UMAR UBA
`IBRAHIM UMAR UBA - avatar
0
An array is a collection of homogeneous elements in which data is stored in a contagious location. Types of ARRay: 1-D array 2-D array Multi-Dimensional ARray; Loop: Loop is used in the programming language of repetition of block of statements. Types of Loop: 1)For loop 2)Do while loop 3)while loop 4)Nested loop
25th Jul 2021, 2:07 PM
Abhishek Kumar
Abhishek Kumar - avatar