Computer Programming
Instructor: Venkatesh Vinayakarao
Term: Aug - Dec 2018
Teaching Assistants: To be announced.



Welcome to Computer Programming in C! This course introduces students to computational thinking and problem solving using the C programming language. Programming has become a necessary skill for not only computer engineers, but almost for everyone in a variety of fields. From a school kid to a grand mother, everyone codes. This course aims to develop the proficiency to program in C. This course does not focus on any specific IDE or operating system.

Key Learning Objectives

At the end of this course, you should be able to:
  • Think programmatically.
  • Read, write and execute C programs of size up to 100 lines.
  • Understand the strengths and limitations of C language.

Topics
Variables, Constants, Data Types, Branching, Loops, Case Control, Functions, Pointers, Recursion, C Preprocessor, Single and Multidimensional Arrays, Handling Strings, Stuctures, Console and File Input/Output, Bit Operations, Enumeration.

Evaluation
InstrumentMax Marks
Midterm 115%
Midterm 215%
Final Exam30%
Assignments (5 * 8% each)40%
Bonus Project (optional)0%

Pre-requisites
There is no pre-requisite courses for this course. Students are expected to bring curiosity for problem solving and systematic thinking. Students are encouraged to have their own laptops. Any operating system and any C compiler should work. Knowledge of any of the following will be a plus:
  • Number Systems: Differences between fixed-point and floating-point, and single vs. double precision could be useful to learn a programming language. Instructor will cover the necessary basics in this course.
  • Computer Architectures: Differences between 32-bit and 64-bit helps in understanding why C program behavior is unpredictable at times. This course will inspire you to learn more about computer organization and architectures.
  • Compilers: Basics of compiler design helps us appreciate the working of a C-compiler. We will discuss compilation phases, differences between C code, intermediate code and executables, and also the differences between interpreted and compiled languages. This course should inspire you take a course on compiler design.
  • Theory of Computation: What is an algorithm? What is computable and what is not? These are interesting questions which we will only touch upon. A hands-on C course such as this should inspire you to dig deeper into the precise notion of algorithms which happens to be a subject matter of the course, Theory of Computation.


Project
The project component is optional. Even if attempted, students will not get any additional marks for this work. Yet, students are highly encouraged to do an impressive project. This will improve their proficiency and confidence in dealing with C. At the end of the course, best project will be announced. To be selected for the best C project, the project should have 300 to 400 lines of code. Student should be able to explain every line of code. Students who are attempting the project must register before submitting the first assignment. Contact TA with the topic of your project for registration. You may withdraw from the project at any point of time during the course.

Schedule
LectureTopicReadingsLecture SlidesLabs/TutorialsAssignmentDemo Code
1IntroductionChapter 1 and 2 from YK, C
Mitch Resnick: Let's teach kids to code
Learning to Code is Not Just for Coders
Lecture 1Lab 1hello.c
guess.c
2Decision and Case ControlChapter 3, 4 and 7 from YK
Chapter 3 from C
Assignment 1
3Loop ControlChapter 5 and 6 from YK
Chapter 3 from C
4FunctionsChapter 8 from YK
Chapter 4 from C
Assignment 2
5RecursionChapter 10 from YK
Midterm 1
6PointersChapter 9 from YK
7PointersChapter 9 from YK
Chapter 5 from C
Assignment 3
8Data TypesChapter 11 from YK
9C PreprocessorChapter 12 from YK
Assignment 4
10Arrays (Single and Multidimensional)Chapter 13 and 14 from YK
Midterm 2
11StringsChapter 15 and 16 from YK
12StructuresChapter 17 from YK
Chapter 6 from C
13Input/OutputChapter 18, 19 and 20 from YK
Chapter 7 from C
Assignment 5
14Bit OperationsChapter 21 from YK
15Miscellaneous Features (typedef, volatile, varargs)Chapter 22 from YK
End Sem Exam


Resources

Text
  • [C] The C Programming Language. 2015 Edition. Brian Kernighan and Dennis Ritchie.
  • [YK] Let Us C. 15th Edition. Yashwant Kanetkar. BPB Publications.
References
  • G. Dromey, How to Solve It by Computer, Prentice-Hall, Inc., Upper Saddle River, NJ, 1982.
  • Project Euler


If you are not having fun, you are not the best coder you can be!