Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

1.As it pertains to array, which of the following statements are invalid?

i++;

}

a> The program compiles run , but it gets stuck in infinite loop

b>the program does not compile

c>the program compiles but does nothing

d>the program compiles and run successfully

3.Given the following integer values: 50 45 20 25 30 70 5 80

Using the selection sort method , to sort the values in ascending order, the state of the list after three passes is: select one

a> 5 45 20 25 30 70 50 80

b> 5 20 25 45 30 70 50 80

c> 5 20 45 25 30 70 50 80

d> 5 20 25 30 45 70 50 80

4.Consider the following two lines of code:

int [] x = [2,3,4,5,6,7,8,9,1,0]

int y= x[1] + x[x[0]];

What value is stored in the variable y?

a 5

b 6

c Cannot be determined

d 1

e 4

f 7

5.Which of the following statements concerning arrays are true? Select all valid answers

a an array is an object

b the elements of an array can either be objects or primitive data values

c all the elements in an array have the same type

d the array sized is fixed after it is created

6.Which of the following are valid declarations for linear arrays?

a int vehicle [25];

b int vehicle;

c int [] vehicle;

d int [25] vehicle;

e int vehicle[];

6.Sorting is the act of arranging items in some specified order- such as alphabetical order, or rank such as grouping items that more popular than others.

TRUE

FALSE

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question