Purchase Solution

C Add Function to add Two List Structures

Not what you're looking for?

Ask Custom Question

I am working on program assignment in structures (c language)after entering the required integers the add function will not compile.I receive error messages I am using a Microsoft c, c++ 6.0 compiler. The help required is to provide a working add function in c. Hopefully after that I will be be able to write similar functions to subtract multiply and divide.

Purchase this Solution

Solution Summary

The given problem requires that an add function be provided that should add two given lists n and m. The add function traverses the lists in order to add the contents. This is an excellent way of learning about the operation of C structures, in particular the application of Linked Lists in C. You can use the same concept to subtract, multiply or divide numbers, in effect build a calculator.

Solution Preview

The solution is attached.
<br>
<br>The given problem requires that an add function be provided that should add two given lists n and m. Please verify that the following steps are done in order to achieve the desired result.
<br>
<br>1. getinput1() is used to create the linked list of the first series of integers n.
<br>2. getinput2() is used to create the linked list of the second series of integers m.
<br>3. for each node (i.e each integer) of the first linked list n, create a new node of another list t, such that ...

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

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.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

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.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.