Write a version of the following c code segment

Assignment Help Basic Computer Science
Reference no: EM131094020

1)    In tonight's lab you worked with the program Fibonacci.txt. Using this as a guide, implement another array in addition to fibs, and call it "reversefibs."  When you generate the list of Fibonacci numbers, place the numbers in reverse order in reversefibs and print out BOTH the list of Fibonacci numbers AND the reversed list of Fibonacci numbers.

2)   In MIPS assembly, write a version of the following C code segment:

 int A[10], B[10], C[10]

  for (i=1; i < 11; i++) {

    A[i] = i;

    B[i] = A[i] * 2;

     C[i] = A[i] * 4;

  }

At the beginning of this code segment, the only values in registers are the base address of arrays A and B in registers $a1 and $a2. Avoid the use of multiplication instructions-they are unnecessary.Create the arrays in your program and run it in the MARS simulator, and hand in a printout of all arrays, and the source code.

Screenshot of the data is OK, but make sure the font is LARGE ENOUGH to read.

Reference no: EM131094020

Questions Cloud

How does psychology research contribute to health knowledge : How does psychology research contribute to health knowledge and the mind and body relationship? There is a variety of research methods used in psychology. Correlation studies, experimental designs, ex post facto designs, cross-sectional studies an..
Common link state and distance vector routing protocols : Create a 1-page document based on your Week Two Learning Team collaborative discussion,
Discuss the authors interpretation of the result : Describe the research question, including a brief summary of the background for the paper and a hypothesis statement. (If a clearly stated hypothesis is not evident, write and develop one that fits the study purpose.)
Applying the system development life cycle model : Students will gain practical experience applying the System Development Life Cycle model and related techniques by undertaking an individual project based on a real organizational need.
Write a version of the following c code segment : 1)    In tonight's lab you worked with the program Fibonacci.txt. Using this as a guide, implement another array in addition to fibs, and call it "reversefibs."
Major steps from phase : You do not need to use all of the P2 audit steps shown in the Unit III Lesson, but use at least three major steps from each phase (a major step being Step 5 rather than Step 5.1).
Training session on the placement : You have been asked by a local company to conduct a training session on the placement, use, maintenance, and testing of portable fire extinguishers for the company's staff.
Describe and analyze a typical measles outbreak : The purpose of this assignment is to get some experience describing and analyzing a typical measles outbreak. Here is the scenario: You are an epidemiologist with the state immunization program
Find the utility possibility frontier : Economics 711: Final Exam 2005. Consider an economy with two goods and two consumers and one producer. The aggregate endowment vector is (1, 2). The first consumer's utility function is u(x, y) = xy, Find the utility possibility frontier

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explaining constraint programming

It is about constraint programming. We have party organizations for being social. Every participant has their own preference list for parties, every party organizers has their own preference list for giving parties, too.

  Use functions to get a list of integers from a user

Use functions to get a list of integers from a user and then find statistics of the given list of integers. You are not allowed to use any built in functions for finding the calculations in this assignment.

  Defined a collection of data contained in a single variable

An "array" is defined a collection of data contained in a single variable name. Each element of the array can be reference by a numerical index.

  Understanding of computer hardware

The purpose of this assignment is for you to test your understanding of computer hardware, compatible architecture, and system requirements. You will design your own computer by selecting parts from the website NewEgg.com. You will be given a budget ..

  Compare and contrast five design pattern activity

Design Pattern Activity: Prepare a 2-3 page paper comparing and contrasting five of the design patterns . Choose any five from the list. Adapter - helps to reuse an object or method by adapting its interface to a more common one

  Write computer code to perform a discrete fourier transform

Write computer code to perform a Discrete Fourier Transform and use it to find the Fourier transform of the pressure data for Task 4 (the crank angle data and volume data are also given but you don't need it for this Task). The last piece of infor..

  What upgrade options exist for moving from server

1. What upgrade options exist for moving from Server 2008 (R2) to Server 2012?  What limitations or caveats should be considered when upgrading? Would you typically recommend a clean install or an in-place upgrade when attempting to move a service fr..

  Four cloud computing service models

In your current business environment, or one you were in at one time, which of the four cloud computing service models do you think might be good for that company to consider? How would a change to one of the cloud computing service models change ..

  Positive and negative incentives for compliance

Class, there are both positive and negative incentives for compliance; we have talked primarily about negative incentives (fines, negilgence lawsuits, jail time).

  What are some domains in which they can be used

What are some domains in which they can be used? Justify your answers with examples and reasoning.

  We are interrupted or disintegrated

Research is compelling that it takes us approximately 4 to minutes return to our work with the same level of through processes whenever we are interrupted or disintegrated. Is it possible to information is fairly constant?

  Write a pseudocode statement

Write a pseudocode statement that subtracts the variable downPayment from the variable total and assigns the result to the variable due. Don't use integer as decimal places will be needed.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd