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
Q. Write down the recursive function to count the number of the nodes in the binary tree.    A n s . R ecursive Function to count no. of Nodes in Binary Tree is writt

Write a function that performs integer division. The function should take the large number in memory location 1 and divide it by the large number in memory location 2 disregarding

Any Binary search tree has to contain following properties to be called as a red- black tree. 1. Each node of a tree must be either red or black. 2. The root node is always b

Define Spanning Tree A Spanning Tree of a connected graph is its linked acyclic sub graph (i.e., a tree) that having all the vertices of the graph.

Q. Using the following given inorder and preorder traversal reconstruct a binary tree Inorder sequence is D, G, B, H, E, A, F, I, C

write an algorithm given each students name and grade points for six courses.find his grade point average and group students into the gpa groups 3.5

Define Hashing. Store the following values in a hash table of table size 11 using division method: 25, 42, 96, 101, 102, 162, and 197. In case of collision, use other hash functio

a. In worst case the order of linear search is O (n/2) b. Linear search is more competent than Binary search. c. For Binary search, the array must be sorted in ascending orde

Various graph traversal schemes Graph Traversal Scheme. In many problems we wish to investigate all the vertices in a graph in some systematic order. In graph we often do no

Implementation of Stack :- Stacks can be executed in the 2 ways: a)  Arrays b)  Linked List