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
Read the excerpt from The Code Book. Other attacks include the use of viruses and Trojan horses. Eve might design a virus that i
antiseptic1488 [7]

Answer:

Tell about an experience with a computer virus.

Explanation:

Simon Singh's "The Code Book," tells the history of how cryptography came into being and the secret messaging world of encryption. Through the detailed narration and diving into the history of encryption, the author traces the evolution of such a process and reveals how it has had a huge impact on the world's policies.

In the given excerpt, Singh gives an example of how viruses are planted and used to spy/ get access to other people's computers. But while it is possible to get the main point of the example, <u>it would have been better if the writer includes experience with a computer virus</u> so that readers will find it easier to connect with the given example. This will enable them to better understand the working of viruses and their effects.

Thus, the correct answer is the first option.

3 0
3 years ago
Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
nydimaria [60]

Answer:

using System;

class ProjectedRaises {

 static void Main() {

     const float raise = 0.04f;

     double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;

Console.WriteLine("Current salary for each employee: ");

     salary1 = Single.Parse(Console.ReadLine());

     salary2 = Single.Parse(Console.ReadLine());

     salary3 = Single.Parse(Console.ReadLine());

     salary1 = salary1 + raise * salary1;

     salary2 = salary2 + raise * salary2;

     salary3 = salary3 + raise * salary3;

     Console.WriteLine("Next year salary for the employees are: ");

     Console.WriteLine(Math.Round(salary1));

     Console.WriteLine(Math.Round(salary2));

     Console.WriteLine(Math.Round(salary3));

}

}

Explanation:

This declares and initializes variable raise as a float constant

     const float raise = 0.04f;

This declares the salary of each employee as double

     double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;

This prompts the user for the salaries of the employee

Console.WriteLine("Current salary for each employee: ");

The next three lines get the salary of the employees

<em>      salary1 = Single.Parse(Console.ReadLine());</em>

<em>      salary2 = Single.Parse(Console.ReadLine()); </em>

<em>      salary3 = Single.Parse(Console.ReadLine()); </em>

The next three lines calculate the new salaries of the employees

<em>      salary1 = salary1 + raise * salary1;</em>

<em>      salary2 = salary2 + raise * salary2;</em>

<em>      salary3 = salary3 + raise * salary3;</em>

This prints the header

     Console.WriteLine("Next year salary for the employees are: ");

The next three lines print the new salaries of the employees

     Console.WriteLine(Math.Round(salary1));

     Console.WriteLine(Math.Round(salary2));

     Console.WriteLine(Math.Round(salary3));

7 0
3 years ago
You have been hired to set up a network for XYZ Enterprises. What factors will you consider to determine the type of network nee
Margarita [4]

Answer:

I would say if it is a multiple choice

Explanation:

q3 or q5 would be the best ones to pick from in my eyes.

3 0
3 years ago
Read 2 more answers
In this exercise, use the following variables : i,lo, hi, and result. Assume that lo and hi each are associated with an int and
Assoli18 [71]

Answer:

result = 0

i = lo

while i <= hi:

       result = result + i

       i += 1

Explanation:

Initialize the <em>result</em> as 0 to hold the summation value.

Since we are asked not to change the value of <em>lo</em> and <em>hi</em>, our loop control variable is <em>i</em> and initially it starts from <em>lo.</em>

Since we are asked to add the number from <em>lo</em> to <em>hi, </em>while loop condition checks it.

While the condition satisfies (during each iteration), the value of <em>i</em> is added to the result and the value of <em>i</em> is incremented by one.

7 0
3 years ago
The procedure call mystery(38) will yield which output? __________ a) 0 12 b) 12 0 c) 1 1 0 2 d) 1 1 1 1 e) 2 0 1 1 public void
Ivan

Answer:

Option b is the correct answer for the above question.

Explanation:

  • The mystery function is a recursive function that calls for the two times when the user passes 38 on the argument.
  • The first value is 38 and the second value is 2 for which that function is called.
  • When the value 38 is passed, then again 2 is passed because of the "mystery (n % 3);" statement.
  • This statement holds by the if condition which gives the true when the argument value is greater than 2.
  • Hence for the 2 value the if condition will not true and the function is not called again.
  • Then the 38/3 and 2/3 are printed whose value is 12 0, but it will print 0 12 because of the recursive function.
  • Hence option b is the correct answer while the other is not because other options does not states the output of this program.
3 0
2 years ago
Other questions:
  • What key combination in excel takes you back to the first cell
    7·1 answer
  • Briefly define "address space" and discuss its major tradeoffs (advantages/costs). What problem is it addressing?
    10·1 answer
  • A technician needs to boot a PC from a USB drive.
    5·1 answer
  • What are attribute grammars used for?
    8·1 answer
  • What integer is represented by the following 8-bit twos complement representation: 1011 0000 ? (Enter your number in decimal, an
    6·1 answer
  • All of the following are used to fund private schools except ______
    14·2 answers
  • Create a query that shows columns employee last name, job title and hire date for those employees who joined the company on or a
    7·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!!!
    7·2 answers
  • Hannah wants to write a book about how scientists and society interact, and she has generated ideas for chapters. Which chapter
    13·1 answer
  • Pls need this asap
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!