1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Pachacha [2.7K]
2 years ago
6

Explain how arrays are stored in memory? Show how arr [5] is stored in the memory. Assume each memory location is one byte long

Computers and Technology
1 answer:
Black_prince [1.1K]2 years ago
8 0

Explanation:

Array is collection of similar data types it is a linear data structure.Array stores elements in a contiguous memory location.

We have an array arr[5]  of size 5 and it is of integer type.Suppose the starting address of the array is 2000 and each memory location is one byte long.As we know that the size of integer is 2 or 4 bytes we take it 2 bytes.

If the starting address is 2000 that is of index 0 then the address of index 1 is 2000+2=2002.

address of index 2=2004.

address of index 3=2006.

address of index 4=2008.

Since size of int is 2 bytes hence we add two memory location.

You might be interested in
The following code appears in a sort function. Will this function sort in increasing order (smallest first) or decreasing order
dusya [7]

A sort function sorts in an ascending or desceding order

The true statement is that the function would sort in decreasing order.

<h3>What is a sort function?</h3>

A sort function is a code segment that is used to reorder a list in ascending or descending order, when called or evoked

<h3>The order of the sort function</h3>

The code segment is given as:

if (list[index] < list[index + 1]) {

temp = list [index];

list[ index] = list [index +1];

list[index +1] = temp;

}

In the above code, we can see that the code compares a list element with the next element on the list, and the larger value comes to the front

This means that the sort function sorts in decreasing order

Read more about code segments at:

brainly.com/question/16397886

7 0
2 years ago
Please answer quick :(​
Karo-lina-s [1.5K]

Answer:

1<2 or 15<6 is true

2<4 and 7< 3 is false

not(7>2) is false

6 0
10 months ago
Read 2 more answers
A(n) _____ is money paid for work.<br><br> A. raise <br> B. allowance<br> C. wage<br> D. grant
Andreas93 [3]

Answer:

wage

Explanation:

3 0
3 years ago
Read 2 more answers
In a flashdisk wich icon can you use to open files in computer​
Dvinal [7]

Answer:

In a flashdisk,

If you are windows: click "my computer", and under the "cpmputer" section, you will find your flashdisk's name, and click it, in there you can find and also open your files.

If you are Mac: click "Finder", click "Desktop" and find your flashdisk's name, and click it, in there you can find and also open your files.

6 0
3 years ago
John is analyzing strange behavior on computers in his network. He believes there is malware on the machines. The symptoms inclu
enot [183]

Answer:

Boot Sector Virus

Explanation:

A malicious software or malware is an executable line of code, programmed by a cybercriminal for ill intentions. There are many types of malware namely; viruses, rootkit, keylogger, trojan horse etc.

A boot sector virus is a kind of malware that runs before the operating system, affecting the boot sector of the hard disk, so even when a linux live cd is running as the operating system, the virus is still active.

5 0
2 years ago
Other questions:
  • List 7 internal components in a computer system
    8·2 answers
  • Do you believe that OOP should be phased out and we should start working on some alternative
    6·1 answer
  • How do you delete a slide from your presentation after selecting it
    8·1 answer
  • How to simplify???? 2(-3x^2+6x+1)-2(4x^2-3x+1)<br><br>​
    7·1 answer
  • In relation to data science,advances in technology has made it more feasible to do what
    5·1 answer
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • What is the suffix of hollow?
    7·1 answer
  • Suppose you are working as an administrative assistant at a small law firm. Your boss has asked you to send an invitation out to
    5·1 answer
  • Privacy, anonymity, and freedom of expression are all interrelated.
    12·1 answer
  • What does an arrow after a command indicate
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!