#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

// A typical data structure we use in Data Structures in C
typedef struct {
	int importance;
	char taskName[80];
} UserData, *UserDataPtr;

// the test main shows you how to dynamically allocate memory
// to hold an instance of a UserData that you can use.
// If the allocation fails, the program will automatically close
// after logging the file name and the line number of the assertion
// that failed.
int main ()
{
	// allocate memory
	UserDataPtr UDP = (UserDataPtr) malloc (sizeof(UserData));
	// make sure the allocation worked and exit if it failed
	assert(UDP != NULL);     // use assert to verify !NULL
	printf ("Allocation worked\n");
	// free up the memory
	free (UDP);
	return 0;
	
}