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
kifflom [539]
3 years ago
6

HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took

to get the correct answer. But when Adam tests the program, it always outputs that it took the user one guess, even when it takes many guesses. What error did Adam most likely make, and how should it be fixed?
Computers and Technology
1 answer:
topjm [15]3 years ago
8 0

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

You might be interested in
Excerpt from "How Prepared Are Students for College Level Reading? Applying a Lexile-Based Approach."
Verizon [17]

Answer: Students graduating from high school are not prepared for college-level work.

Explanation:

From the excerpt, it was written that there is a high rates of enrollment in remedial college courses which shows that there are many students are graduating from high school who are unprepared for college-level work.

Therefore, based on this, the best summary of the paragraph is that the students graduating from high school are not prepared for college-level work.

Therefore, the correct option is C.

7 0
3 years ago
Select the guidelines you should follow when creating a resume
nignag [31]

Start with your name and contact information, use a font that’s easy to read, and keep the format consistent

7 0
3 years ago
Read 2 more answers
Explain how arrays are stored in memory? Show how arr [5] is stored in the memory. Assume each memory location is one byte long
Black_prince [1.1K]

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.

8 0
3 years ago
suppose a malloc implementation returns 8-byte aligned addresses and uses an explicit free list where the next and previous poin
Naya [18.7K]

4 bytes because even if you call malloc and free a little more frequently, that might still occur. malloc frequently uses the extra space for managing (a linked list of all memory blocks and their sizes) when it takes a few bytes more than what is requested.

There is a good chance that you will tamper with the internal management structures and cause the subsequent malloc of free will to crash if you write some bytes either before or after your allocated block.

4004 because malloc internally always allocates at least four bytes. Your program would be 4000 if you added four bytes, making it 4004. may crash only when you access byte n+1. Additionally, the operating system typically only protects pages of memory.

Your process may be able to read-write the remainder of the page and will only crash when accessing the next memory page if your malloc-ed byte is in the middle of a page with a size of 512 bytes. But keep in mind: Even if this works, the behavior is not clear.

To learn more about internal management here

brainly.com/question/13398903

#SPJ1

Full Question = Suppose a malloc implementation returns 8-byte aligned addresses and uses an explicit free list where the next and previous pointers are each 32-bits. Blocks have a 32-bit header and 32-bit footer, where the low-order bit of the header and footer are used to indicate whether the block is allocated (1) or free (0). Furthermore, the block size (which includes the header, payload, footer, and any necessary padding) is rounded up to the nearest multiple of 8, and this size (in bytes) is stored in the header and footer. Assume any padding must be between the payload and the footer.

a) If we call malloc(1), what block size will be allocated, in bytes?

b) With the same conditions, and assuming we've already called malloc(1), if the heap used by malloc starts at address 0x4000 (16384 in decimal), what address would be returned if we then called malloc(32)?

8 0
1 year ago
Describe the different non-printing characters,​
irakobra [83]

Answer:

or formatting marks are characters for content designing in word processors, which aren't displayed at printing. It is also possible to customize their display on the monitor. The most common non-printable characters in word processors are pilcrow, space, non-breaking space, tab character etc.

Explanation:

5 0
3 years ago
Other questions:
  • 1) why is software engineering considered engineering and not manufacturing?
    9·1 answer
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • WHICH OF THE FOLLOWING LOOKS JUST LIKE A CD ROM BUT CAN STORE MUCH MORE INFORMATION
    8·2 answers
  • To rename a database object, press and hold or right-click the object in the navigation pane and then tap or click ____ on the s
    10·1 answer
  • Problem 3. Consider the following recurrence, defined for n a power of 4 (for the time of some algorithm): T(n) = 3 if n = 1 2T(
    5·1 answer
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • To have a reason or purpose to do something
    8·2 answers
  • 1. Software that is designed to intentionally cause harm to a device, server, or network is A. outware B.loggerware C.
    12·1 answer
  • Brainly not working for me not showing any ads or answers
    5·2 answers
  • Which of the following is NOT one of the four benefits of using email?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!