Write functions for both addition and subtraction, Data Structure & Algorithms

You will write functions for both addition and subtraction of two numbers encoded in your data structure. These functions should not be hard to write. Remember how you add and subtract numbers in base 10 and you should be able to figure out how to do it. Addition should automatically calculate the sum of memory locations 1 and 2 and store the answer in memory location 3 (erasing any other number that was previously in memory location 3). Subtraction should automatically calculate memory location 1 minus memory location 2 and store the answer in memory location 3 (again, erasing any previous data).

Posted Date: 3/20/2013 2:47:35 AM | Location : United States







Related Discussions:- Write functions for both addition and subtraction, Assignment Help, Ask Question on Write functions for both addition and subtraction, Get Answer, Expert's Help, Write functions for both addition and subtraction Discussions

Write discussion on Write functions for both addition and subtraction
Your posts are moderated
Related Questions
Merge sort: Merge sort is a sorting algorithm that uses the idea of split and conquers. This algorithm splits the array into two halves, sorts them separately and then merges t

Give example of assertion and abstract data type For illustration, consider Natural ADT whose carrier set is the set of non-negative integers and whose operations are the usual

Write an algorithm to add an element at the end of circular linked list.   Algorithm to Add the Element at the End of Circular Linked List. IINSENDCLL( INFO, LINK, START, A

Red-Black trees have introduced a new property in the binary search tree that means an extra property of color (red, black). However, as these trees grow, in their operations such

Ask question #MWhich of the following is not a characteristic of good algorithm? inimum 100 words accepted#

Define the terms     i) Key attribute     ii) Value set  Key attribute:  An entity  type  usually  has  an attribute  whose  values  are  distinct  fr

Comparison of Gouraud and Phong Shading Phong shading requires more calculations, but produces better results for specular reflection than Gouraud shading in the form of more r

In the last subsection, we have implemented a stack by using an array. While a stack is implemented by using arrays, it suffers from the basic restriction of an array - i.e., its s

Write an algorithm to calculate a postfix expression.  Execute your algorithm using the given postfix expression as your input : a b + c d +*f ↑ . T o evaluate a postfix expr

In file access: what is the difference between serial, sequential and indexed sequential searching