Exercises

Here are some exercises for toning your C muscles. NOTE: In the below text:
 #define IF_WRONG_CORRECT_IT "Is there something wrong with this code? How would you correct it?"

Multi-dimensional arrays

Simple Strings

Download the simpleString.c file. This defines a simple string and a pointer to a char. Modify this template code to demonstrate and analyze the below exercises.

String functions

Download the strfn.c file. This defines a template code that calls different string library functions (Google "library functions in C"). Using them solve the below questions:

Array of strings

Download the str2D.c file. This defines a template code that plays with an array of strings. Using them solve the below questions:

File IO

Download the fileIODemo1.c file. This defines a template code for file input and output. The code reads a list of english words from a dictionary file (say, english.0 file) and prints the words. Using the code, solve the below questions: