Question

"I want a short answer about ARRAY:" Can i use a variable to work with set/group...

"I want a short answer about ARRAY:"
Can i use a variable to work with set/group of values?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored such that the position of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called one-dimensional array.

For example, an array of 10 32-bit (4-byte) integer variables, with indices 0 through 9, may be stored as 10 words at memory addresses 2000, 2004, 2008, ..., 2036, so that the element with index i has the address 2000 + (i × 4).

The memory address of the first element of an array is called first address, foundation address, or base address.

Because the mathematical concept of a matrix can be represented as a two-dimensional grid, two-dimensional arrays are also sometimes called matrices. In some cases the term "vector" is used in computing to refer to an array, although tuples rather than vectors are the more mathematically correct equivalent. Tables are often implemented in the form of arrays, especially lookup tables; the word table is sometimes used as a synonym of array.

Arrays are among the oldest and most important data structures, and are used by almost every program. They are also used to implement many other data structures, such as lists and strings. They effectively exploit the addressing logic of computers. In most modern computers and many external storage devices, the memory is a one-dimensional array of words, whose indices are their addresses. Processors, especially vector processors, are often optimized for array operations.

Arrays are useful mostly because the element indices can be computed at run time. Among other things, this feature allows a single iterative statement to process arbitrarily many elements of an array. For that reason, the elements of an array data structure are required to have the same size and should use the same data representation. The set of valid index tuples and the addresses of the elements (and hence the element addressing formula) are usually, but not always, fixed while the array is in use.

The term array is often used to mean array data type, a kind of data type provided by most high-level programming languages that consists of a collection of values or variables that can be selected by one or more indices computed at run-time. Array types are often implemented by array structures; however, in some languages they may be implemented by hash tables, linked lists, search trees, or other data structures.

note: plzzz don't give dislike.....plzzz comment if you have any problem i will try to solve your problem.....plzzz give thumbs up i am in need....

Add a comment
Know the answer?
Add Answer to:
"I want a short answer about ARRAY:" Can i use a variable to work with set/group...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • About Python 3 I want to make calculation data saved as array form So I want...

    About Python 3 I want to make calculation data saved as array form So I want code like this i=0 while i<10 x=(mean of 20 random sampled numbers) save x to array A i=i+1 print(A) so I expect A=[x1,x2,x3,x4,x5,...,x10] How can I do this?

  • Answer the following questions I want to double check my work

    Answer the following questions I want to double check my work Q1: (8086 processor) Translate the following code segment written in high level languages into assembly code. Assume Ax contains signed number. If AX >=2 then CX=CX+1 ; Else AX-CX; End Q2: Show how this statement M JK-1 could be translated into assembly code using 8086 instruction set a) b) MIPS instruction set Assume M. J and K are memory variables In s086 assume 16-bit, we can use MOv instruction...

  • Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized...

    Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized with the following strings: “Einstein”, “Newton”, “Copernicus”, and “Kepler”. 2. Assume names in an Integer array with 20 elements. Write a pseudocode algorithm a For Loop that displays each element of the array. 3. Assume the arrays numberArray1 and numberArray2 each have 100 elements. Write a pseudocode algorithm that copies the values in numberArray1 to numberArray2 . 4. Write a pseudocode algorithm for a...

  • For python: Use np.random.rand(5,5) to create a random 5x5 array. Use boolean indexing to set the...

    For python: Use np.random.rand(5,5) to create a random 5x5 array. Use boolean indexing to set the nine entries in a 3x3 block in the bottom right corner to 0. Print the result. (Hint: Use np.ones() or np.zeros() with the dtype argument to get a 5x5 array full of True's or False's. Use this array to build a boolean filter, in order to set only the entries you want equal to 0.)

  • I need help making this work correctly. I'm trying to do an array but it is...

    I need help making this work correctly. I'm trying to do an array but it is drawing from a safeInput class that I am supposed to use from a previous lab. The safeInput class is located at the bottom of this question I'm stuck and it is not printing the output correctly. The three parts I think I am having most trouble with are in Bold below. Thanks in advance. Here are the parameters: Create a netbeans project called ArrayStuff...

  • I need a Python code for this problem. We can use python's array slicing in many...

    I need a Python code for this problem. We can use python's array slicing in many ways, and here is just one example. To take the forward derivative of an array y, we use (y[i+1] - y[i])/dx For example, if dx=1 , we might write a derivative routine as yderiv = zeros (len(y)-1) for i in range(len(y)-1): yderiv[i] = y(i+1] - y[i] Note that here, yderiv is one element shorter than y -- this is because you need 2 points...

  • I have some images of cats dogs and brids data set that I want to use...

    I have some images of cats dogs and brids data set that I want to use to train a code using machine learning to distenguish new images by the whether they pictures od dogs, birds or cats. can you show how to do it in an example. please write the code.

  • C3. Convert the following C-code to MIPS code. [Use register $al for the variable i, temporary re...

    C3. Convert the following C-code to MIPS code. [Use register $al for the variable i, temporary registers for other values, and load the base memory address of the array OxA0000080 to Şao] int i i int array [101; for (i= 0; i<5 ; i=i+1 ) { [i+1] [i] 8; * array = array C3. Convert the following C-code to MIPS code. [Use register $al for the variable i, temporary registers for other values, and load the base memory address of...

  • ******Choose correct answer********** If you want to create a group where you can distribute information to...

    ******Choose correct answer********** If you want to create a group where you can distribute information to your users, then you should use this type. a. Distribution b. open c. security d. Sharing

  • I need a matlab code to answer the questions below ICE09B Make an Array Develop a...

    I need a matlab code to answer the questions below ICE09B Make an Array Develop a MATLAB code which will produce an array that looks like the following: 4 10 1. You must start with a blank array and build the array with a DNFL. You can NOT just load the array with an assignment statement. Hint: Use "addition" for your variables Square all values in the array 2. Blackboard will ask you for a screenshot of your properly working...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT