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
Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr

Data Structure and Algorithm 1. Explain linked list and its types. How do you represent linked list in memory? 2. List and elucidate the types of binary tree. 3. Descr

Q. Let a binary tree 'T' be in memory. Write a procedure to delete all terminal nodes of the tree.       A n s . fun ction to Delete Terminal Nodes from Binary Tree

Question 1 Write the different characteristics of an algorithm Question 2 Explain in brief the asymptotic notations Question 3 Write an algorithm of insertion sort and e


Q. Define a method for keeping two stacks within a single linear array S in such a way that neither stack overflows until entire array is used and a whole stack is never shifted to

Explain the bubble sort algorithm. Answer This algorithm is used for sorting a list. It makes use of a temporary variable for swapping. It compares two numbers at an insta

merging 4 sorted files containing 50 10 25 and 15 records will take time

This is the most extensively used internal sorting algorithm. In its fundamental form, it was invented by C.A.R. Hoare in the year of 1960. Its popularity lies in the easiness of i

Full Binary Trees: A binary tree of height h that had 2h -1 elements is called a Full Binary Tree. Complete Binary Trees: A binary tree whereby if the height is d, and all of