Program for combination of dynamic memory allocation, MATLAB Programming

This assignment deals with the combination of dynamic memory allocation and structures to create a common data structure known as a doubly-linked list, which is shown in Figure 1.

1238_Program for combination of dynamic memory allocation.png

Figure 1: Doubly-linked list in which each node contains three fields--pointers to the previous and next nodes in the list, and a single integer as data.

The boxes containing 'X' at the beginning and end of the list show that the first and last nodes have NULL pointers for their previous and next pointers, respectively. The pointers to the first and last nodes, which allow the list to be traversed in either direction, are not shown. The list you will implement is a sorted doubly-linked list in which the data stored in each node is a string, and the nodes are sorted in alphabetical order. You will complete four functions, which allow you to add or delete a node, find a node containing a given string, or print the entire contents of the list.

2. Deliverables This assignment uses multiple files, each of which is provided on the course web page:

  • prog10_main.c: Main program. Do not change the contents of this file.
  • DLList.h: Header file that contains structure definitions and function prototypes to be used in this assignment. Do not change the contents of this file.
  • DLList.c: Definitions for the functions described in DLList.h. You should only complete the functions in this file-do not change any of the #include statements, structure definitions, or function prototypes (i.e., function return types and arguments). To complete this assignment, you will complete each of the functions in DLList.c. If each function is properly written, the entire program will work correctly. All three files must be included when compiling your code-see Section 6 for a description of how to add multiple files to a Visual Studio project.
Posted Date: 4/2/2013 2:27:25 AM | Location : United States







Related Discussions:- Program for combination of dynamic memory allocation, Assignment Help, Ask Question on Program for combination of dynamic memory allocation, Get Answer, Expert's Help, Program for combination of dynamic memory allocation Discussions

Write discussion on Program for combination of dynamic memory allocation
Your posts are moderated
Related Questions
what is matlab

Expand a matrix: To expand a matrix, an individual element could not be added as that would mean there would no longer be the similar number of values in every row. Though,

Write a Matlab function that computes y1= tan(x) and y2= sin(x)/cos(x), returns the difference |y1–y2| and prints a message whether the two are equal or not. Test your function for

Write single MATLAB statements to create these vectors from any vector Z. You can use vector Z shown as a sample input. Create a single m-file script (non-function) to containing a

The Efficient Method: Though, in MATLAB, there is another built-in function which specifically produces random integers, i.e. randint. Calling the function with randint (1,1,n

Call to length function: The call to length function consists of the name of the function, followed by an argument in the parentheses. This function takes the argument, and re

I need a source code for hand detection in matlab please ....

Scripts with Input and output: Placing all this together, we can implement the algorithm from the starting of this section. The following script computes and prints the area o


(a) Using Matlab, find and plot the magnitude of the DTFT of 10 samples of x(n) for n=[0:1:9] of x(n) = cos(2*pi*f1*n) + cos(2*pi*f2*n)  for f1=0.22 and f2=0.24 and pad zeros to ge