Computer Programming
Lead Instructor: Venkatesh Vinayakarao
Co-Taught Post Mid-Term With: Krishna Chaitanya and Prabhat
Term: Aug - Dec 2018
Teaching Assistants: Co-ordinator: Rishav Chandra Varma.
Our TA Team:



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
Midterm20%
Final Exam30%
Assignments (2 * 8% + 1 * 9%)25%
Bonus Project (optional)0%
Lab Exam25%

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
Read How can I learn to think like a programmer?
Lecture 2Lab 2Assignment 1
Deadline: 6th Sep 2018
datatype1.c
datatype2.c
decision1.c
decision2.c
decision3.c
decision4.c
decision5.c
decision6.c
decision7.c
decision8.c
decision9.c
3Loop ControlChapter 5 and 6 from YK
Chapter 3 from C
Lecture 3Lab 3 loop1.c
loop2.c
loop3.c
loop4.c
loop5.c
loop6.c
loop7.c
loop8.c
loop9.c
loop10.c
4FunctionsChapter 8 from YK
Chapter 4 from C
Lecture 4
Arrays and Strings
Lab 4 functions.zip
string1.c
string2.c
5RecursionChapter 10 from YK
Lecture 5Lab 5Assignment 2
Deadline: 20th Sep 2018
recursion1.c
recursion2.c
recursion3.c
recursion4.c
recursion5.c
recursion6.c
recursion7.c
recursion8.c
recursion9.c
recursion10.c
6PointersChapter 9 from YK
Chapter 5 from C
Lecture 6.1
Lecture 6.2
Lecture 6.3 (Static)
Lab 6 pointers.zip
CP-SurpriseTest1-SecA (Solutions)
CP-SurpriseTest1-SecB (Solutions)
7C in PracticeNone.Lecture 7
Midterm Sample Question Paper
MidTerm-2018 Set 1
MidTerm-2018 Set 2
8Data TypesChapter 11 from YK
Storage Classes and Data Types [zip]
9C PreprocessorChapter 12 from YK
Lecture 9Assignment 3
Deadline: 31st Oct 2018
10Arrays (Single and Multidimensional)Chapter 13 and 14 from YK
Arrays.zip
11StringsChapter 15 and 16 from YK
Strings LectureString Programs
12StructuresChapter 17 from YK
Chapter 6 from C
Structures.zip
13Input/OutputChapter 18, 19 and 20 from YK
Chapter 7 from C
Input/Output Lecture
14Bit OperationsChapter 21 from YK
Bitoperations.zip
15Miscellaneous Features (typedef, volatile, varargs)Chapter 22 from YK
Miscellaneous FeaturesMisc.zip
End Sem Exam  Sample End-Term Paper [pdf]
Lab 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!