ECE264: Advanced C Programming
Summer 2019
MTuWThF: 8:40-9:40 AM, EE170
About the Course
Description:
This course focuses on the principles and practice of programming in C. We will cover the topics needed to become knowledgable C programmers, and concepts that can be transferred to many other languages. Topics include:
- Tools for programming (Git, GDB, and make)
- Data types and structures
- Pointers and memory allocation
- Recursion
- Dynamic data structures (linked lists and trees)
Details:
The course syllabus discusses most of the details of the course, including a tentative schedule of topics, exam dates, and other administrative information. Assignment links will be distributed via Blackboard announcements and emails, and grades will be posted on Blackboard. We will be using Piazza for online discussion of the lectures and assignments. If you have a question about a concept covered in lecture or about a detail of an assignment, check Piazza first!
Instructor:
Nikhil Hegde
hegden 'at' purdue 'dot' edu
Office hours: Tuesdays and Thursdays, 10AM-11:30AM
EE207
TA:
Snehith Reddy Guntaka
sguntaka 'at' purdue 'dot' edu
Office hours: Mondays, Wednesdays, 4PM-6PM. Fridays, 1:30PM-3:30PM
EE207
Lecture Schedule and Notes
The slides are based-on Prof. Kulkarni's and Prof. Quinn's notes for the course taught in previous semesters. Notes courtesy: Prof. Kulkarni. Most of the content in the notes are copied from Prof. Kulkarni's notes.
- Week1: Tools (Git, make, GDB), Program layout in memory, Data types and structs; Slides Notes: 6/10/19, 6/11/19, 6/12/19, 6/13/19, 6/14/19
- Week2: Addresses, Pointers, Pointer Arithmetic, Dynamic memory allocation Slides Notes: Week2
- Week3: RecursionSlides Notes:
- Week4: Recursion (contd), Quicksort, File Handling Slides Notes:hanoi1,hanoi2,quicksort
- Week5: Sorting (mergesort), Depth-first search, Enums, Unions, 2D arrays, Dynamic data structures (Linked-Lists, Stacks, Queues)Slides Notes:week5
- Week6: Review for exam 2 (handling seg faults), Trees, Binary Trees, Discussion of exam 2 solutions Slides
- Week7: Binary tree traversal, Binary Search Trees, Misc. topics: const, variadic functions, macros, Parallel programming through threads Slides Notes:Code for Binary Search Tree, pthreads code for summing an integer array
- Week8: Review for exam 3 (7/29 and 7/30) Slides
Homework Assignments and Exams
All homework assignments are due at 11:59PM unless otherwise announced. Assignment and exam details will be posted during the session.
The submission instructions for homework assignments are here.
Possible errors in Git submission process, correcting them, and understanding your scores here.
- Homework assignment 1: Tools, Selection sort, PA01, Due 6/17/19.
- Homework assignment 2: Program Stack, Buffer overflow attack PA02, Due 6/23/19.
- Review for Exam 1 - Past exams: Fall2016 (Q2 only), Spring2016 (Q1 and Q3 only), Several exams here (Requires Purdue careeracc login. Check Exam 1 (skip Q5) and Exam 2 (only Q1 and Q2) of Spring 2019).
- Exam 1, Wednesday, 6/26/19, 8:40AM, EE170. Topics: Tools (GDB, Makefile), Program memory, Data types (including structures), Pointers (including function pointers) and arrays, Pointer arithmetic, and Dynamic memory allocation. Exam 1 Makeup (optional)
- Homework assignment 4: File handling, structures, function pointers PA04, Due 7/2/19. Prerequisite: PA03 (Solution to homework assignment 3 is provided. Hence, you do not have to submit PA03)
- Homework assignment 5: File handling, Memory allocation PA05, Due 7/9/19. Key
- Homework assignment 6: Merge Sort PA06, Due 7/15/19.
- Review for Exam 2 - Past exams: Spring 2019 - Exam 2 (Q3, Q4, Q5, Q6) and Exam 3( Q5), Fall 2017 - Exam 2 (Linked Lists and Files), Spring2016 (Q2 only), Fall2016 (Q1 and Q4 only)
- Exam 2 (computer-based): Wednesday, 7/17/19, 8:30AM - 10AM, EE206, EE207, EE215. Topics: Recursion, Using GDB to analyze seg-faults, File handling, Valgrind, Unions, 2D-Arrays, Linked-ListsExam2_blank, Exam2_solution.
- Homework assignment 7: Linked-lists PA07, Due 7/22/19.
- Homework assignment 8: Stacks PA08, Due 7/27/19. Input files
- Homework assignment 9 (Bonus): Expression Trees PA09, Due 7/31/19.
- Topics for Final exam:
- Topics not covered in exam 1 and exam 2 (Files, Binary Search Trees, Const, Macros, Parallel Programming): Old Exam (Q1, Q3 only - Files, Dynamic Structure), Fall 2016 (Q3 - Binary Search Tree), Spring 2019 Exam 3 (Q4 to Q9), Exam 2 (everything except Q1)
- Topics from previous exams (Number representation - Hexadecimal, Octal etc.), Addresses, Strings, Literals, Function pointers
- Final Exam: Friday, 8/2/2019, 8:40AM to 9:40AM, EE170. Format: paper-based, open-book, open-notes, descriptive and multiple-choice questions.