Create a make file to compile and link all three files

Assignment Help Programming Languages
Reference no: EM132211460

Question: (Write a program, and show the output too) C programming

Write functions in three file :

1. deposit.c

void deposit ( float *bal, float amount )

{

*bal = *bal + amount;

}

2. withdraw.c

void withdraw ( float *bal, float amount )

{

*bal = *bal - amount;

}

3. atm.c

int main ( )

{

float balance = 200.00 ;

deposit ( &balance , 10 ) ;

printf ( " Balance %f \n" , balance ) ;

withdraw ( &balance, 20 ) ;

printf ( " Balance %f \n" , balance ) ;

}

Create a make file to compile and link all three files.

Do not change the names of the three files: deposit.c , withdraw.c and atm.c

I will use your makefile to compile my versions of the files.

1. Just submit the makefile.

2. Your makefile should be able to compile individual files: deposit.c and withdraw.c

3. Your makefile should create a executable file : atm which I will execute and check. In other words, your makefile should have a target named atm will generate the executable

4. Your makefile should also have a target named clean that will erase all *.o files.

Make sure you don't delete *.c or *.txt files.

Reference no: EM132211460

Questions Cloud

Write program in script file that converts measure of area : Write a program in a script file that converts a measure of area given in units of either m^2, cm^2, in^2, ft^2, yd^2, or acre to the equivalent quantity.
Write a program stringarray usign given information : Write a program "StringArray" which creates a string array that contains your top 5 favorite kinds of foods (Italian, Chinese, etc.).
Write a program that stores the values : Write a program that stores the values ' X' and 76.1 in separate memory cells. Your program should get the values as data items and display them again.
What was the highest grade on test two : Write a method that takes in a teacher's last name and exam number via parameters. Ask the teacher (using her name) to tell you the highest score on that exam.
Create a make file to compile and link all three files : Create a make file to compile and link all three files. Do not change the names of the three files: deposit.c , withdraw.c and atm.c
Write a program that requests a floating point number : Write a program that requests a floating point number then separately outputs the integer and fractional components.
Write a program that simulates the rolling of two dice : Write a program that simulates the rolling of two dice. The program should use rand to roll the first die and again use it to roll the second die.
Write a program that repeatedly asks the user to type : Write a program that repeatedly asks the user to type in a sentence and press Enter. Your program will store each sentence the user types into some container.
Write a program that searches for a particular item : Write a program that searches for a particular item in a huge random array and see how long it take, using linear and binary searches.

Reviews

Write a Review

Programming Languages Questions & Answers

  Program to read employee information in the array of objects

Let the program which will read employee information into the array of objects, sort array by employee identification number, write the sorted array.

  Shell script that will count the number of files in account

Modify the script to get it to back up to "X" number of days and list the files that were modified for each day.

  Write application to inputs ten numbers from user

Write the application to inputs ten numbers from user, each number can be between 10 and 100, inclusive. As each number is read in determine if it is number already entered.

  Create class polynomial is array of terms

Create the class Polynomial. Internal representation of the Polynomial is the array of terms. Each term contains the coefficient and the exponent.

  Write program to read file consisting of students test score

Write program which reads a file consisting of students test scores in range 0-100. It muts then determine number of students having scores in each of the ranges.

  Compares lisp with either prolog java c-cpp or python

Write a short paper (800-1000 words) that compares and contrasts Lisp with either Prolog, Java, C/C++, or Python.

  Program to calculate integer part of quotient

Calculate the integer part of the quotient when integer a is divided by integer. Calculate the integer remainder when integer a is divided by integer b

  Implement and test the human resource information system

Assignment C# Application & Test Report - As part of your development efforts you will prepare and apply a small collection of test cases to verify that the completed application meets some of the key requirements agreed with the client - Your smal..

  Program to read information from keyboard

Write a C++ program that reads the following information from the keyboard terminated with the sentinel -999 in the Student Number, and stores the records in arrays (3 separate arrays).

  Function to retrieve each of the private data members

Write a class called "Date" with month, day and year as private members. Have constructor that sets default date to 1st January 2000. Have accessor function which retrieves each of the private data members.

  Write a program to converts temperatures

Write a program to converts temperatures between Fahrenheit and Celsius. Your program should print a brief message describing what it does, and then prompt the user to enter "1" if they would like to convert a Fahrenheit number to Celsius.

  Create a program that generates a random password

Create a program that generates a random password ***** user-defined length. For the purposes of this problem, we will assume that any character that corresponds to ASCII (decimal) values.

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