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

#include "alloc.h"

// Exercise:
//
// Finish this program. 
//
// - files: Makefile, main.c, alloc.c, alloc.h
// - executable name is "main"
// - make sure to check "valgrind --leak-check=full ./main"
//
int main()
{
    // allocate an array of 5 ints and fill it with 100, 101, ..., 104
    int *p1 = alloc_and_fill(100, 5);

    // print_array takes a pointer and # of elements, 
    // and prints them in a single line separated by space
    print_array(p1, 5);

    int *p2 = alloc_and_fill(200, 15);

    print_array(p1, 15);

    // TODO: use valgrind to fix bugs and leaks, if any
}
