Examlex

Solved

An Array, Numbers, Has Been Declared and Initialized as Follows

question 99

Essay

An array, numbers, has been declared and initialized as follows:
int [ ] numbers = { 45, 78, 99, 12, 66 };
What is the index of 78?
What is the array element at index 4?
Change the array so that we have value 77 instead of 99.
Swap the value at indexes 1 and 2 without knowing what the values are.
Using a loop, assume that you do not know how many elements are in the array and increase all the values of numbers by 10.
Using a loop, assume that you do not know how many elements are in the array and what they are, and calculate and output the number of elements that are strictly greater than 50.
Using a loop, assume that you do not know how many elements are in the array and output every other element of the array, starting at the first element.


Definitions:

Availability Heuristic

An instinctive heuristic that uses the readily accessible instances that occur to someone as they assess a distinct theme, notion, strategy, or judgement.

Unusual Uses Test

An assessment of creativity that asks individuals to list as many uses as possible for a common object within a given time frame.

Remote Associates Test

A creativity test that measures the ability to see relationships between seemingly unrelated words and to generate a word that is linked to all three.

Divergent Thinking

A thought process or method used to generate creative ideas by exploring many possible solutions, emphasizing spontaneity and non-linear approaches.

Related Questions