+ 4

Any one help me in starting arrays? I am unable to start arrays ? No idea about arrays .Guide me !

31st May 2018, 4:09 PM
Shehroz Irfan
Shehroz Irfan - avatar
7 Answers
+ 6
Array is collection of similar data type. That means Array of integers will have all interger values . Each element in array will have a index.You can access the elements with the help of this index.
31st May 2018, 4:13 PM
Mitali
Mitali - avatar
+ 5
ok that's clear
31st May 2018, 4:40 PM
Shehroz Irfan
Shehroz Irfan - avatar
+ 5
what about using loops in arrays ? and searching in arrays?
31st May 2018, 4:40 PM
Shehroz Irfan
Shehroz Irfan - avatar
+ 5
what you suggest ? how to have a grip on Arrays?
31st May 2018, 4:41 PM
Shehroz Irfan
Shehroz Irfan - avatar
+ 5
Have a look at this code. this code is in c++. int x[50]; // here x can store 100 values. As for arrays index starts from 0. It contain indexs from 0 to 49 because the maximum values it can store are 50// for(int t=0;t<50;t++) { x[t]=t; // here it loads the arrays values that are from 0 to 49 // } once prefer this: https://www.tutorialspoint.com/cprogramming/c_arrays.htm
31st May 2018, 4:56 PM
Random
Random - avatar
+ 4
ok
31st May 2018, 4:58 PM
Shehroz Irfan
Shehroz Irfan - avatar
0
Arrays are collection elements with same datatype.if you create an a array using int datatype then it stores the elements of all integer datatype. U need specify the length of the array too .Length of arrays defines the maximum number of values it can store. if you want access the array elements u need to use its index.For arrays, index starts from 0.
31st May 2018, 4:21 PM
Random
Random - avatar