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
Nady [450]
3 years ago
14

Questions: 1) Run the C program, attach a screenshot of the output in the answer sheet. 2) Check the address of the array and th

e address of the first element in the array printed out using method 1. Are they the same? If yes, please explain why. 3) Check the addresses of the elements in the array printed out using method 1 and method 2 separately. Are they the same? If yes, please explain why. 4) Write down the statement to print out the length of the array by using sizeof operator. 5) If array numbers is passed to a function, can we still use the sizeof operator to obtain the length the array numbers in that function? If not, please explain why.
Computers and Technology
1 answer:
KiRa [710]3 years ago
5 0

Answer:

Output

mumners = 0x7ffc4d2767d0

Method1: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767d4

numbers[2] = 0x7ffc4d2767d8

numbers[3] = 0x7ffc4d2767dc

numbers[4] = 0x7ffc4d2767e0

Method2: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767e4

numbers[2] = 0x7ffc4d2767f8

numbers[3] = 0x7ffc4d27680c

numbers[4] = 0x7ffc4d276820

sizeof(numbers) = 20

2.

mumners = 0x7ffc4d2767d0

Method1: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

Yes both are same since address of the array is the address of its first element

3.

Method1: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767d4

numbers[2] = 0x7ffc4d2767d8

numbers[3] = 0x7ffc4d2767dc

numbers[4] = 0x7ffc4d2767e0

Method2: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767e4

numbers[2] = 0x7ffc4d2767f8

numbers[3] = 0x7ffc4d27680c

numbers[4] = 0x7ffc4d276820

Address printed using Method1 and Method2 are same since name of the array itself a pointer and adding 1 to it gives second element address and 2 to it gives third element and so on similarly applying address operator over the array elements provides the direct address of the element.

4.

printf("Length(numbers) = %lu\n",sizeof(numbers)/sizeof(numbers[0]));

Dividing an size of array by size of individual array elements gives length of an array

Length(numbers) = 5

5.

Yes even if numbers are passed to a function sizeof can be applied since numbers is starting address of an array and to pass an array as argument its address passed.

You might be interested in
The windows troubleshooting utility that identifies and eliminates nonessential files is called _____.
Virty [35]
I think it is Defragment
8 0
3 years ago
Read 2 more answers
oftware that is free and whose code can be accessed and potentially modified by anyone is referred to as _____. shared source fi
ad-work [718]

Answer:

open source software

Explanation:

A software that is free and whose code can be accessed and potentially modified by anyone is referred to as an open source software. The license used by the developer of an open source software grants all users the permission to use, distribute and modify the software at any time.

Some examples of an open source software are Firefox, gimp, OpenOffice etc.

8 0
3 years ago
On a system with paging, a process cannot access memory that it does not own. Why? How could the operating system allow access t
kompoz [17]

Answer:

  • Because the page is not in its page table
  • The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table

Explanation:

On a system with paging, a process cannot access memory that it does not own because the page is not in its page table also the operating system controls the contents of the table,therefore it limits a process of accessing to only the physical pages allocated to the process.

The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table.that way two processes that needs to exchange  data can efficiently do that . i.e creating a very efficient inter-process communication

7 0
3 years ago
In access, field names cannot contain digits. true or false.
Sedaia [141]
The answer is false.
8 0
3 years ago
Which of these situations would benefit from the AutoRecover feature? Check all that apply.
UNO [17]

Answer: Your friend wants you to email her.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • How far is florida from oklahoma?
    10·2 answers
  • Andrew wants to create a website for his college. Which web-based programming language should he use?
    11·2 answers
  • Write a script that calculates the common factors between 8 and 24. To find a common factor, you can use the modulo operator (%)
    14·1 answer
  • You and your project team have been asked to generate a solution to a problem. The problem is not complicated, and you are sure
    6·1 answer
  • One concern some users have about storing data or accessing applications in the cloud is .
    10·1 answer
  • Irene is creating a wireframe of a website she is working on to show her client. In which phase of the development process is sh
    13·1 answer
  • The one who will defeat me in this typing race I will mark the one brainliest:
    5·2 answers
  • Which device do engineers use to drive a system of gears?
    15·2 answers
  • Which term describes the surrounding area of this image?
    10·1 answer
  • A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, d
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!