C program for Time conversion
Not what you're looking for?
Construct a library Time that contains the time-conversion functions (given a number of seconds, returns the equivalent number of minutes; given the number of minutes, returns the equivalent number of hours; given the number of hours, returns the equivalent number of days; given the number of seconds, returns the equivalent number of days). Write a driver program to test your library.
Purchase this Solution
Solution Summary
Three source code files will show you how to write appropriate functions to convert different time scales/metrics. This can be useful in
a) code to write software clock or watch
b) understanding of how to use multiple files for a single project
c) understanding of the use of header files
This will show how to compile multiple files into one executable file.
Solution Preview
First compile the library file
gcc -c myTime.c
this will create myTime.o
then simply do
gcc -o test testTime.c myTime.o
remember that the header file myTime.h containing the signatures of the functions should be included in your test driver file
Here is the code file
myTime.c
/* To compile the functions into a library ...
Purchase this Solution
Free BrainMass Quizzes
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
C# variables and classes
This quiz contains questions about C# classes and variables.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
Basic Networking Questions
This quiz consists of some basic networking questions.