Question: Question 6: What does the following statement do? code [0 ] ='A'; Question 6 options: Tests to see if element 0 of the code array

Question 6: What does the following statement do?

code [0 ] ='A';

Question 6 options: Tests to see if element 0 of the code array is equal to the letter A

Assigns the letter A to the first element in the code array

Searches through the elements of the code array to see if the letter A exists

Replaces all of the elements of the code array with the letter A

Each variable (element) in a two-dimensional array is identified by a unique combination of two subscripts, which the computer assigns to the variable when the array is created.The subscripts specify the variables ____ and ____ position in the array.

Question 7 options:

row, column

header, footer

left, right

top, bottom

What symbol do you use next to a data type to indicate an array?

Question 8 options:

( )

[ ]

{ }

| |

What is the index of 300? int [] a = {50, 75, 100, 150, 200, 300, 450, 510, 700};

Question 9 options:

3

4

5

6

What is the length of the following array? int[] a = {2, 4, 6, 8, 10};

Question 10 options:

5

6

7

10

if we have the statement int k[8]; what is the value in k[4]?

Question 11 options:

0

garbage

a space

3

if we have the statement int k[8] = {1, 2, 3, 4, 5, 6, 7, 8}; what is the value in k[4]?

Question 12 options:

4

garbage

5

3

Question 13 (3 points)

Saved

if we have the statement int k[8] = {}; what is the value in k[4]?

Question 13 options:

0

garbage

a space

3

Question 14 (3 points)

if we have the statement int k[8] = {1, 2, 3}; what is the value in k[4]?

Question 14 options:

0

garbage

a space

3

Question 15 (3 points)

if we have the statement int k[8]; will the C statement k[14] = 44; compile?

Question 15 options:

yes

no

Question 16 (3 points)

does C do array bounds checking???

Question 16 options:

yes

no

ArraysSA

Question 17 (2 points)

given int k[5] = {2, 5, 1, 7, 9};

add the element with the value of 2 to the element with the value of 9 and store the sum in the element with the value of 2

Question 17 options:

k[1] = k[5] + k[1];

k[0] = k[5] + k[1];

k[6] = k[5] + k[1];

k[0] = k[4] + k[0];

Question 18 (18 points)

array coding matching

Question 18 options:

123456789

k[0][1] = 44;

123456789

char ch [10]

123456789

float flt [2][6];

123456789

int k[7] = {2, 89, 1, 7890, 6, 900, 56}

or

int k[] = {2, 89, 1, 7890, 6, 900, 56}

123456789

k[4] = k[0] + k[6];

123456789

int k[5];

123456789

k[0][0] = 44;

123456789

k[2][5] = 44;

123456789

k[0] = 123;

1.

Code the statement(s) to define an array of characters named ch which has 10 elements.

2.

Assume that the statements necessary to define an array of int's named k which has 7 elements and initialized them with the following values: 2, 89, 1, 7890, 6, 900, 56 HAS ALREADY BEEN CODED

code the statement to change the value of the element of the array that has 2 to 123

3.

Assume that the statements necessary to define an array of int's named k which has 7 elements and initialized them with the following values: 2, 89, 1, 7890, 6, 900, 56 HAS ALREADY BEEN CODED

code the statement to add the element containing the value 2 to the element containing the value 56, and store the value in the element containing 6

4.

Code the statements necessary to define an array of int's named k which has 7 elements and initialize them with the following values in one C statement 2, 89, 1, 7890, 6, 900, 56

5.

Code the statement(s) to define an array of ints named K which has 5 elements

6.

Code the statement(s) to define a two dimensional array of floats named flt that has 2 rows and 4 columns.

7.

assume a 2 dimensional array of ints named k has been defined with 3 rows and 6 columns. Code the statement to assign the value 44 to the array element in the first row and the second column

8.

assume a 2 dimensional array of ints named k has been defined with 3 rows and 6 columns. Code the statement to assign the value 44 to the array element in the first row and the first column

9.

assume a 2 dimensional array of ints named k has been defined with 3 rows and 6 columns. Code the statement to assign the value 44 to the array element in the last row and the last column

Question 19 (8 points)

matching definitions

Question 19 options:

1234

definition of data type

1234

definition of an array

1234

definition of a function

1234

definition of "scope" of a variable

1.

named block of code that returns a value

2.

collection of like data types that share a name and are referenced by an index

3.

the manner in which the machine stores the data and the operators that can access the data type

4.

A scope in any programming is a region of the program where a defined variable can have its existence and beyond that variable it cannot be

Question 20 (24 points)

match the definitions

Question 20 options:

12345678

what does 'overloading' a function mean

12345678

definition of a function

12345678

definition of variable

12345678

definition of "scope" of a variable

12345678

why do we need variables

12345678

what determines a block of code

12345678

definition of an array

12345678

definition of data type

1.

named block of code that returns a value

2.

collection of like data types that share a name and are referenced by an index

3.

the manner in which the machine stores the data and the operators that can access the data type

4.

A scope in any programming is a region of the program where a defined variable can have its existence and beyond that variable it cannot be

5.

named location in memory

6.

to store information we will need later in the program

7.

pair of curly braces { }

8.

multiple functions with the same name but different parameter lists.

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 Databases Questions!