Programming in C

Updated 2018-11-16

Syllabus

Possible resources:

         http://fresh2refresh.com/c-programming/

         Interactive tutorial: http://www.learn-c.org/

         http://beginnersbook.com/2014/01/c-tutorial-for-beginners-with-examples/

Program #10: Due 11/30/2018

Text input files. Search online for documentation on reading a text file from a disk. Problem description.

Some useful functions: fopen, feof, fscanf,

 

 

 

 

 

 

 

 

 

 

Program #9: Due 11/16/2018

Arrays and using pointers to step through an array. Search online for documentation on using pointers to step through an array. Here is one site that explains the relationship between arrays and pointers. Note, however, that wherever "$$$$" appears on the page, a less than character (<) should replace it. Don't ask me why. Problem description.

Program #8: Due 11/09/2018

Parameter passage and array algorithms. Problem description. You will need to know how to pass an address to a function and how to "de-reference" the address in the function.

Program #7: Due 11/02/2018

Functions, loops. Odometer palindromes. Problem description. There is nothing new win this assignment, so all you need to do is work on an algorithm to determine if an integer is a palindrome. I suppose if you search, you can find an algorithm online, but try to solve the problem on your own.

Program #6: Due 10/26/2018

More arrays: Passing an array to a function, stepping through an array, finding min, max, sum, average. Sorting an array. Writing a function declaration. Problem description.

Program #5: Due 10/19/2018

The drunk jailer. Problem description. Array resources: Web page, Video. Booleans in C. For loops in C.

Program #4: Due 10/05/2018

Bit-wise operators in C. Counting bits. Problem description.

Program #3: Due 9/28/2018

Input, output, arithmetic. Irrigation pivot. Problem description.

Program #2: Due Friday, 9/14/2018

Functions, for loops, formatted output. Loan payments. Problem description.

Program #1: Due 9/07/2018 at 9:30 a.m.

Character data, while loops. Problem description.

Program #0: Due 8/31/2018

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

Resources

         Tiny C compiler

         Tiny C documentation

         A versatile editor: Notepad++. Note that you can use any text editor to create programs.

         One of many online resources to learn C: C tutorial/documentation

         You will have to run TCC from the command line. Command line tutorial.

Assignment

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.

Arrays. The drunk jailer. Problem description. This problem involves arrays in C. Array resources: Web page, Video. Booleans in C. For loops in C.

C Course outline

Assignments

 

Put your C program (simple.c) in the drop box before midnight Saturday (6/3/2016).

Extra Credit program: Breaking a dollar. This program is also an actual problem from a prior programming contest. It requires you to generate all permutations of a set of numbers, which is something that comes up in programming contests fairly often. Due Date: Friday, 12/07/2012 at 11:59 p.m.

 

Program #8: Planetary Time. Due Wednesday, 10/31/2012 at 2:00 p.m.

 

 

Program #7: Triangular Numbers. Due Wednesday, 10/24/2012 at 2:00 p.m.

 

 

Program #6: Huge roots. Due Date: Friday, 10/19/2012 at 2:00 p.m.

 

 

Program #5: Odometer palindromes.Due Date: Wednesday, 10/10/2012 at 2:00 p.m.

 

 

Program #4: Counting bits. This program requires (1) an understanding of binary numbers, and (2) an understanding of Java's bit-manipulation operators. Due Date: Wednesday, 10/03/2012 at 2:00 p.m.

 

 

Program #3: Drunk jailer. This program is also pretty straightforward, but it is an actual problem from a prior programming contest. This program gives you the opportunity to use arrays. Due Date: Wednesday, 9/26/2012 at 2:00 p.m.

 

 

Program #2: Irrigation pivot. This program is also pretty straightforward, and is an actual problem from a prior programming contest. It gives you the opportunity to review a little geometry. Due date: Wednesday, 9/19/2012 at 2:00 p.m.

 

 

Program #1: Amortization table. This program is pretty straightforward. You will have to read data from a file, print output to the screen, and do some basic computation. There will NOT be any programs this easy at the programming contest. The purpose of this program is for you to get used to using Java again. Due Date: Wednesday, 9/12/2012, at 2:00 p.m.

 

 

Program #5: Points on a line, due date: Friday, 10/17/2008.

Program #6: Caesar cipher, due date: Friday, 10/24/2008.

Optional Program #7: Lingo, due date: Friday, 10/31/2008. If you missed a due date for an earlier assignment, this can make up for it.