Question: Given the declaration int [ ] list = { 1 , 2 , 3 , 4 , 5 } ; a . what is the

Given the declaration
int [] list ={1,2,3,4,5};
a. what is the length of the array
b. how would you change the value of the 3rd element to 5
c. what is the value of list[1]?
2.
Fix the following, assume all necessary declarations have been made: answer next to the
question.
a)
Intent:
Allocate an array with 5 integers and initialize all the elements to 5;
for(i=0;i<=10;i++)
array[i]=-2;
overloading
random numbers
generate a random number between 5 and 12
PART 4
The following program which asks you user for a string and output is reversed
1 import java.util.Scanner;
2 public class Backward
3{
4 public static void main(String[] args)
5{int i,j;
6 Scanner in = new Scanner(System.in);
7 char []charsIn=new char[79];
8 char []charsOut=new char[79];
9 String input;
10 System.out.println("Welcome to the Talking Backward
Program");
11 System.out.print("Please enter from 1 to 80 characters.
");
12 input=in.nextLine();
13 for(i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!