Hi There!

I'm Dan Schlegel, an Associate Professor in the Computer Science Department at SUNY Oswego

CSC344 – Assignment 1

Microproject

Write a C program which contains the following: a function called invert_case which inverts the case of each letter in the specified string; a main function which asks the user for an input string, calls invert_case using a pointer to that string, and prints the output.

Main Project

In this assignment you will write a C program which produces auto-complete suggestions, similar to what Bash does when beginning to type a command and pressing <tab>. Your program will read all of the file names in a user-provided directory and store them in a data structure made up of an (at least) 26-element array of linked lists. You will need to implement a linked list in C. You will have one linked list for each letter of the alphabet, within which you will store the filenames which begin with that letter in some sensible order. After reading the filenames into the array of linked lists, the user will be given a “> ” prompt, at which they will enter the beginning of a filename they are interested in. When the user presses tab, all filenames which match that prefix will be printed (again in a sensible order). The program will continue to prompt for beginnings of filenames until an empty string is entered.

You may use any built-in C library functions in your program. You may not use code found on the internet.

Sample Interaction
Suggested Development Environment

Eclipse CDT

Extra Credit

Your score will be increased by 10% of the earned score for a successful implementation which uses a prefix tree known as a trie instead of an array of linked lists. Your implementation has to be your own – evidence of code copied from the internet will result in a 0.