Write a c program that includes a function called lobster

Assignment Help C/C++ Programming
Reference no: EM131320357

(1) Write a C program that includes a function called lobster() that accepts three arguments: a character and two integers. The character argument is the character to be printed by lobster(). The second argument is the number of times that the character will be printed on a row. The third argument is the number of rows to be printed. Call your function from within your program in order to demonstrate that it works (use 'z', 3, 5 as parameters). Comment your code, make sure it looks professional, and use meaningful variable names.

(2) Write a C program that includes a function called moveEm() that accepts the ADDRESSES of three double variables as input. The function should move the value of the smallest variable into the first variable, the middle value into the middle variable, and the largest value into the third variable. Call your function from within your program using the arguments 7.8, 3.5, and 1.1 in order to demonstrate that it works (make sure your logic works for any order of largest, smallest, middle however). Comment your code, make sure it looks professional, and use meaningful variable names. (NOTE: This function does something similar to swap3.c--I recommend using it as a model.)

For example: if I had three double variables as follows: x=7.8, y=3.5, z=1.1 then I would call moveEm like so:

moveEm(&x, &y, &z);

After moveEm() returned x would contain 1.1, y would contain 3.5, and z would contain 7.8.

Reference no: EM131320357

Questions Cloud

Implement d latch to include an enable line using logisim : Implement the D latch to include a synchronous clear line using Logisim. A clear line will set the value of the D latch to 0 on the next clock pulse.
Presentation of a historical event by different historians : Write a two-to three-page short paper (10 percent of your total grade) comparing and contrasting the presentation of a historical event by two different historians. Historians do not only provide accounts of events (themes, eras, people);
Change program in the breadboard to match this new logic : In Logisim implement a circuit similar to the one in figure 8-10, but which produces output which is the opposite of the input switch (e.g. the LEDs are 0 when the switch is 1, and 1 when the switch is 0). Change the program in the breadboard to m..
What other questions may you want to ask danny : After reviewing the scenario answer the following questions: Do we have enough information to make a diagnosis? What other questions may you want to ask Danny
Write a c program that includes a function called lobster : Write a C program that includes a function called lobster() that accepts three arguments: a character and two integers. The character argument is the character to be printed by lobster().
Expansion of the european union : While some countries tend to favor expansion of the European Union, others generally oppose it. Entering a union agreement with other countries has both benefits and drawbacks for each member country.
Explain whether you would use static or dynamic routing : Determine whether you would use static or dynamic routing to connect the routers. Justify your response with the key benefits that your choice provides.
Controversial issue in southeast asia : 1. What geographical and historical factors have led Singapore to develop such a particular, and highly valued, local form of the English language? 2. Why are the tiny Spratly Islands such a controversial issue in Southeast Asia?
Calculate any binary boolean function : Explain how a 1 bit 4-to-1 MUX can calculate any binary Boolean function. Because the MUX can calculate the result of any Boolean function, we call the MUX a univeral operation.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  The examination room is freed

A doctor checks in by telling the scheduler his or her name, an examination room number, and a medical specialty code. Each doctor has a favorite room. The scheduler checks to see whether the room is free. If so, it assigns this doctor to the room; i..

  Develop a program that when you pipe in a file

develop a program that when you pipe in a file it will demonstrate on the left had side the line number  work by having a program piped in and when a \n occurs a new line and number is indicated.

  Write an array implementation of self-adjusting lists

Write an array implementation of self-adjusting lists. In a self-adjusting list, all insertions are performed at the front - Write a linked list implementation of self-adjusting lists.

  Use a define statement to create a constant

Follow these specifications: Use a define statement to create a constant that will hold your student number. You should have separate string variables for your first and last name; name these first_name and last_name.

  Show that the worst-case running time of quick

Show that the worst-case running time of quick-select on an n-element sequence is ?(n2) - I'm not sure how to solve the question. Can anyone help me?

  Add a copy constructor

Take the code below and add a copy constructor, assignment operator definition and destructor to the class. These functions have already been started for you.

  Program to calculate a shopping bill

Would like you to check and correct this problem. When the program is ran it is supposed to look like this on the screen.

  Program that allows the user to enter two numeric values

Prepare a program that allows the user to enter two numeric values. Then let the user enter a single character as the desired operation, for example 'A', 'a', or '+' for add.

  Create a base shape use this class to store two double

Create a base shape. Use this class to store two double type values that could be used to compute the area of figures. Derive two specific classes called triangle and rectangle from the base shape. Add to the base class, a member function get_data() ..

  Write c program to find the distance travel

Write C program to find the distance travelled at regular intervals of time given the values of 'u' and 'a'. The program should provide the flexibility to the user to select his own time intervals and repeat the calculations for different values of '..

  Correct code so that it finds the sum of 20 numbers

Correct the following code so that it finds the sum of 20 numbers.

  Write a function named largest which will receive the array

Write a function named largest which will receive the array as input and return the variable LargestNumber.

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