The names of all associates undergoing training are stored in an array, associate_name[50]. 5th associate name is retrieved as
Answers
Answer:
associate_name [4]
Explanation:
In array data is stored from 0th element. If an array associate_name [50] has name of all associates, then
first associate name will be in location associate_name [0]
second associate name will be in location associate_name [1]
third associate name will be in location associate_name [2]
forth associate name will be in location associate_name [3]
fifth associate name will be in location associate_name [4]
Answer:
Explanation:
Firstly, you must know what is array, it means collection elements of any data. It is can be symbolic name, size, dimension or any information.
As mentioned in the question, an array needs to be prepared where 50 associates are going for training and we have to extract the name of the 5th associate.
Then its programming would be similar to the following:-
lass A0{
public static void main(String[] args){
int[] z = new int[10];
z[0] = 223;
z[1] = 23;
int[] x = {23,32,43,12,43};
System.out.println(z[0]);
System.out.println(z[1]);
System.out.println(x[3]);
System.out.println(x[0]);
}
}