Programming in C

Updated 2022-02-10


Day #1

Install the Tiny C Compiler (TCC) on your computer (technically, you don't install it; you just copy it to your computer). Video.


        Tiny C compiler

        Tiny C documentation

        An easy-to-use editor that knows C syntax: Notepad++. Note that you can use any text editor to create programs. There are many free, good alternatives. You can even use Notepad.

        Some online resources: C tutorial/documentationFreshInteractive tutorialBeginner's Book.
I have only skimmed these. Let me know if they are useful, or if you find something better.

        You will have to run TCC from the command line. Command line tutorial (first in a series of videos).

Program #0

Write a "Hello World!" program in C (prints out the text "Hello, World!". Use printf for output. Name your program hello-world.c. Put a comment at the top of the program with your name and the name of the assignment (Hello World). Put the "hello-world.c" file in the drop box. Due Friday, 1/22/2022 at 11:59 p.m.

Program #1:

Topics: Character data, while loops. Identifying characters. Problem descriptionDue Friday, 1/29/2022 at 11:59 p.m.

Program #2:

Topics: Functions, for loops, formatted output. Loan payments. Problem descriptionDue Friday, 2/4/2022 at 11:59 p.m.

Program #3:

Topics: Bit-wise operators in C. Counting bits. Problem descriptionDue Friday, 2/11/2022 at 11:59 p.m.

Friday 2/18/2022: No assignment due.

Program #4:

Topics: Input, output, arithmetic. Irrigation pivot. Problem descriptionDue Friday, 2/25/2022 at 11:59 p.m.

Program #5:

Topics: Arrays. The drunk jailer. Problem descriptionDue Friday, 3/4/2022 at 11:59 p.m.

Program #6:

Topics: More arrays: Passing an array to a function, stepping through an array, finding min, max, sum, average. Sorting an array. Problem descriptionDue Friday, 4/01/2022 at 11:59 p.m.

Program #7:

Topics: Functions, loops. Odometer palindromes. Problem descriptionDue Friday, 4/08/2022 at 11:59 p.m.

Program #8

Topics: More arrays: Using pointers to access an array. Problem description. You will need to know how to "de-reference" the array pointer in the function. Due Friday, 4/15/2022 at 11:59 p.m.

Program #9:

Topic: Text input files. Problem description. Some useful functions: fopen, feof, fscanfDue Friday, 4/22/2022 at 11:59 p.m.

Program #10:

Topic: Strings. Problem descriptionDue Friday, 4/29/2022 at 11:59 p.m.