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
ValentinkaMS [17]
3 years ago
10

Write a program to test your functions as follows: Obtain a random number seed from the command line of your program using comma

nd line arguments. Initialize an array p of 8 unsigned char with random numbers from 0 to 255 Initialize a separate unsigned character byte0 with a random number. Print the values in the array p as well as the value for byte0. Print the values in decimal format as well as binary format (use macros defined below) Call setlsbs() using p and byte0 as parameters After the call to set lbs() is completed, print the modified values of the array p. Print the values in decimal format as well as binary format (use macros defined below) Use the modified array p as a parameter to get labs() Print the return value of the call to get sbs(). The returned value should match the original value for byte0 Print the value in decimal format as well as binary format (use macros defined below) You will create a Makefile to compile and link your program. Your program filename should be Lab6__.c

Computers and Technology
1 answer:
Iteru [2.4K]3 years ago
7 0

Answer:

Please find the code attached.

Explanation:

Please find the attached code in pictures.

You might be interested in
What is an 8086 microprocessor used for
Liula [17]
A sixteen bit microprocessor chip used in early IBM PCs. The Intel 8088 was a version with an eight-bit externaldata bus.

The Intel 8086 was based on the design of the Intel 8080 <span>and </span>Intel 8085 (it was source compatible with the 8080)with a similar register set, but was expanded to 16 bits. The Bus Interface Unit fed the instruction stream to theExecution Unit through a 6 byte prefetch queue, so fetch and execution were concurrent - a primitive form ofpipelining (8086 instructions varied from 1 to 4 bytes).

It featured four 16-bit general registers, which could also be accessed as eight 8-bit registers, and four 16-bit indexregisters (including the stack pointer). The data registers were often used implicitly by instructions, complicatingregister allocation for temporary values. It featured 64K 8-bit I/O (or 32K 16 bit) ports and fixed vectored interrupts.There were also four segment registers that could be set from index registers.

The segment registers allowed the CPU to access 1 meg of memory in an odd way. Rather than just supplyingmissing bytes, as most segmented processors, the 8086 actually shifted the segment registers left 4 bits and addedit to the address. As a result, segments overlapped, and it was possible to have two pointers with the same valuepoint to two different memory locations, or two pointers with different values pointing to the same location. Mostpeople consider this a brain damaged design.

Although this was largely acceptable for assembly language, where control of the segments was complete (it couldeven be useful then), in higher level languages it caused constant confusion (e.g. near/far pointers). Even worse, thismade expanding the address space to more than 1 meg difficult. A later version, the Intel 80386, expanded thedesign to 32 bits, and "fixed" the segmentation, but required extra modes (suppressing the new features) forcompatibility, and retains the awkward architecture. In fact, with the right assembler, code written for the 8008 canstill be run on the most <span>recent </span>Intel 486.

The Intel 80386 added new op codes in a kludgy fashion similar to the Zilog Z80 and Zilog Z280. The Intel 486added full pipelines, and clock doubling (like <span>the </span>Zilog Z280).

So why did IBM chose the 8086 series when most of the alternatives were so much better? Apparently IBM's own engineers wanted to use the Motorola 68000, and it was used later in the forgotten IBM Instruments 9000 Laboratory Computer, but IBM already had rights to manufacture the 8086, in exchange for giving Intel the rights to its bubble memory<span> designs.</span> Apparently IBM was using 8086s in the IBM Displaywriter word processor.

Other factors were the 8-bit Intel 8088 version, which could use existing Intel 8085-type components, and allowed the computer to be based on a modified 8085 design. 68000 components were not widely available, though it could useMotorola 6800 components to an <span>extent.
</span>
Hope this helps
7 0
3 years ago
Which statement compares the copy and cut commands?
ella [17]

Answer: duplicate

Explanation:

5 0
3 years ago
Read 2 more answers
assume that name is a variable of type stirng that has been assigned a value write an expression whose value is the last charact
Snezhnost [94]

Answer:

The most straight forward way to do it: in general string are zero index based array of characters, so you need to get the length of the string, subtract one and that will be the last character, some expressions in concrete languages would be:

In Python:

name = "blair"

name[len(name) - 1]

In JavaScript:

name = "blair"

name[name.length - 1]

In C++:

#include <string>

string name = "blair";

name[name.length() - 1];

7 0
3 years ago
Alicia is typing a research paper. She is having difficulty remembering how to use the thesaurus and how to center the title. Sh
pantera1 [17]

Answer:

C. Use the help feature

Explanation:

The help feature in the MS word is the quickest access to getting real time assistance when working on a project.

7 0
3 years ago
Read 2 more answers
What is the relationship between a folder and a subfolder?
zhannawk [14.2K]

A sub folder is one layer under the folder - hence the prefix sub

3 0
3 years ago
Other questions:
  • What task can a user accomplish by customizing theme colors?
    14·2 answers
  • Write the definition of a method named printPowerOfTwoStars that receives a non-negative integer n and prints a string consistin
    10·1 answer
  • Which is true regarding networks?
    7·2 answers
  • Question Workspace Check My Work Copying computer software, video games, movies, or music without paying the producer for them i
    11·1 answer
  • These are statements given by witnesses under oath? A. Testimony B. Admissible Evidence C. Indirect Evidence D. Circumstantial E
    8·1 answer
  • Laxmi was not confident that she could learn to program a computer. When she found out that two girls with similar GPA’s in her
    5·1 answer
  • _____ interviews rely on scenarios and reflections to evaluate an applicant’s skill set.
    9·2 answers
  • Write a program to generate following series in qbasics 100,81,64,....1​
    13·1 answer
  • Write a program that lets a maker of chips and salsa keep track of sales for five different types of salsa: mild, medium, sweet,
    14·1 answer
  • Primary functions of lighting are sufficient light to...
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!