This course will introduce basic concepts of computer programming. We will use C as the language to teach student how to write computer programs to solve problems.
This course will introduce computer programming in C. This freshman CS course will assume no prior experience about computer science. We will cover basic operations about computers, then move on to how to write computer programs in a language called C. Various C concepts will be introduced.
Week 1: Basic programming concepts (book chapter 1, 2, 3), slides: introduction, basic, and computation.
What is in a program?
What is a variable in a program?
How to edit/compile/run a program?
How to read/write a value with a program?
How to assign values into variables?
How to add/subtract/multiply/divide numbers?
How to compare numbers?
How to make logical decision?
Week 2: Flow control and loops (book chapter 4, 5), slides: branch and loop.
How to make a program run different parts on different conditions?
How to make a program run repeatedly?
How to stop/continue a loop?
How to solve problems with conditions and loops?
Week 3: Arrays and Floating point Numbers (book chapter 6, 7), slides: array and floating point numbers.
What is an array?
How to store data into array/retrieve data from array?
How to read/write data into/from array?
What is a multi-dimensional array?
How computers place arrays in memory?
What is a floating point number?
How to read/write a floating point number?
Week 4: Functions (book chapter 8), slides: function.
What is a function?
Why do we need function?
How a function communicates with your program?
Where are the variables in a function? How do they differ from variables in your main program?
Week 5: Pointers (book chapter 9), slides: pointer.
What is memory address?
What is a pointer?
How to access other variables with pointers?
What is the relation between pointers and arrays?
How to access array elements with pointers?
Week 6: Strings and characters (book chapter 10, 11), slides: character and string.
What is a character?
How to read/write a character?
What are the library we can use to process characters?
What is a string?
How to read/write a string?
What is the relation between a character and a string?
What is the relation between a string and a pointer?
What are the library we can use to process strings?
No special prior computer knowledge is required. However, the students are expected to be able to use a web browser, have basic English vocabulary, and arithmetic skills of junior high school graduates.
Library reference (www.cplusplus.com)
We will have video lectures to introduce the concept of programming. The video will switch between the presentation slides and the actual coding process. After that, we will have weekly programming homework to ensure that the students are able to practice what they learned from the video presentation. The students will practice on ideone.com, a web platform for compiling and running computer programs.