Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can someone verify and tell me if these are correct for problem 1? and explain t

ID: 3575606 • Letter: C

Question

can someone verify and tell me if these are correct for problem 1? and explain the one to which are wrong please.

Question 1: (F) = False, (T) = true

TRUE/FALSE SECTION:
a) If we want to find the median of 100 scores, we need 100 separate variables to hold the data... (F)

b) An array behaves like a list of variables each of which is of the same type and for which there is a uniform, convenient naming convention that can be declared in a single line of code. (T)


c) The programmer should always use a defined constant in an array declaration. (T)


d) When using an array, it is perfectly legal to access indexed variables with index values less than 0 or greater than or equal to the declared size of the array. (F)


e) To call a function with an array parameter, write the array argument as the array name followed by an empty square brackets, as in f(a[ ], 7); (The first argument is an array a, the second is the size.) (F)

f) Consider the array declaration, int x[20];. There is no memory allocated for x[20]. (T)

g) Arrays in C may have several different types stored in them. (F)

h) Given the two C array declarations;

   int a[10], b[10];
You can successfully compute one array, say a, then assign b to a:

a = b; (FALSE)

i) In the sequential search algorithm, items are examined alternately, odd then evens, in order to find whether the target value is in array (and if the target is present, to the index of the target.) (T)

j) In a sorting an array, the items in the array are rearranged so that
   

        for all j and k, if j < k, then array [j] <=array [k]

(F)
  

Explanation / Answer

All the answers given by you are correct. I verified them all.

1)

a) If we want to find the median of 100 scores, we need 100 separate variables to hold the data. (False)

b) An array behaves like a list of variables each of which is of the same type and for which there is a uniform, convenient naming convention that can be declared in a single line of code. (True)

c) The programmer should always use a defined constant in an array declaration.(True)

d) When using an array, it is perfectly legal to access indexed variables with index values less than 0 or greater than or equal to the declared size of the array. (False)

e)  To call a function with an array parameter, write the array argument as the array name followed by an empty square brackets, as in f(a[ ], 7); (The first argument is an array a, the second is the size.) (False)

f)  Consider the array declaration, int x[20];. There is no memory allocated for x[20]. (True)

g) Arrays in C may have several different types stored in them. (False)

h) Given the two C array declarations;

   int a[10], b[10];
You can successfully compute one array, say a, then assign b to a:

a = b; (False)

i) In the sequential search algorithm, items are examined alternately, odd then evens, in order to find whether the target value is in array (and if the target is present, to the index of the target.) (True)

j) In a sorting an array, the items in the array are rearranged so that

for all j and k, if j < k, then array [j] <=array [k] (False)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote