Lecture # | Date | Lecture Quiz | Notes | Recording | Pages | Keywords |
---|---|---|---|---|---|---|
WEEK 1 | ||||||
Introduction, course policies and motivations | ||||||
Chapter 1: Introduction to computers, hardware components, CPU components, main memory, processing instructions, programming languages, creating and writing a program, the compiler, hint about: structure and flow charts | WEEK 2 | |||||
Chapter 2: Structure of a C program, Commenting, Identifiers, Data types, Variables. | ||||||
Chapter 2 cont.: Literal Constants, Symbolic/Defined Constants, Formatted I/O, Width and precision modifiers, Errors | WEEK 3 | |||||
Chapter #2: Revisiting important concepts: (Width & precision modifiers. printf and scanf. syntax & runtime errors).
Chapter #3: Expressions(Operators and operands).Operator precedence.Assignment expressions.Simple & Compound assignments. Prefix and postfix (Undefined vs. Well-defined behavior example). |
||||||
Chapter #3 cont.: Live Debugging an example. Single and mixed data type expressions. implicit, explicit (type casting), and assignment data type conversions. Rounding, truncation using floor(), type casting to int, truncation in printing using precision modifiers. A brief overview of "Selection via calculation". | WEEK 4 | |||||
Chapter #3 cont.: Selection via calculation. Chapter#4: Purpose of functions. Motivation - why? Factor – smaller is easier. Reuse - by you or others. Remove redundancy. Protect data – using the variable doesn't change its value. | ||||||
Chapter# 4: cont. Top-Down design. Factoring: Each function does a single task (functionally cohesive). Functions terminology. Call / calling / called / Return. Parameter passing. Types of functions. 1- No parameters - no return value: ex. welcome() , menu_options(). 2- No parameters - with return value: ex. get_input(). | WEEK 5 | |||||
Chapter#4 cont. Types of functions. 1- No parameters - no return value - welcome() , menu_options() 2- No parameters - with return value - get_input(). 3- With parameters - with return value - Many math.h fx, sin(). 4- With parameters - no return value - printf(), display_results(). What is permitted in main() Function - only local variable definitions, function calls and limited selection or repetition (to call functions). Parameter passing: 1- Pass by address. | ||||||
Chapter#4 cont. Parameter passing: 1- Pass by address.2- Pass by address. Pointer operations. Scope. Structure Charts. How to read a structure chart. Bad structure charts examples. | WEEK 6 | |||||
Chapter #4 cont. Problem-solving method (specify, analyze, design, code, test and debug, refine). Chapter #5: Selection. Logical data. logical operators (NOT, AND, OR). Logical operators truth table. Logical expressions evaluation. Short circuit method with example. | ||||||
Chapter#5 cont. : Short circuit examples. Relational operators (<, <=, >, >=). Comparative operators (==, !=). Compound statements. Examples illustrating compound statements with short circuit method. Complements: 1- Relational and comparative operators. 2- Logical operators. | WEEK 7 | |||||
Chapter #5 cont.: Complements with examples. Selection. Flow chart example. Two way selection: if-else with examples. Nested selection. Dangling else. | Midterm Exam #1 - Date: Wednesday, October 5 *** Time: 6:30pm - 7:30pm *** Location: ELLT 116 | |||||
Chapter #5 cont.: Revisiting if-else. Nested selection. Dangling else. Condtional expressions. Multiway selection: (1) if / else if / else with examples compared to if if structure. (2) switch construct. | WEEK 8 | |||||
  FALL BREAK | ||||||
  NO LECTURE - Lecture is canceled to compensate for evening midterm 1 | WEEK 9 | |||||
Chapter #5 cont.: Multiway selection (2) switch construct. Fall through behavior. testing floating points for equality challenges. Switch construct rules. When to use a switch and when not to use a switch. if else vs. conditional expressions vs. switch statements. Chapter #6: Repetition using loops. looping basics and terminology. | ||||||
Chapter #6: Repetition using loops. looping basics and terminology. Repetition Flow chart example (calc avg, min and max of exam scores). Pretest and post-test loops. How to choose the right construct. Factorial example. Event-controlled vs. Counter-controlled processes. Input validation. Basic syntax of while and do while loops. Revisiting Factorial example to demonstrate while and do while loops. | WEEK 10 | |||||
Chapter #6 cont. : while vs do-while loops with example(factorial example). Nesting concept. Nested loops with example (range of factorials example). The infinite loop. The for loop. Converting while loops to for loops examples. | ||||||
Chapter #6 cont. : Rearranging digits in a number example. Extract a specific digit from a number. Determine the largest digit in the number( Maximum function). Get the first maximum value vs. the last maximum value. Add the largest digit to correct location. Keep finding the next numbers and when to stop. Counting zeros in a number. Recursion: concepts with examples (Restaurant waiting line & factorial examples). Recursive cases and Base case. Loops vs. Recursion. | WEEK 11 | |||||
Chapter #6 cont.: Recursion example with tracing 4! in memory. When to use Recursion. When to not use Recursion. Review on repetition construct (while, do-while, for loops and recursion) and when to use each of them. Chapter #8: Arrays: Meaning, motivation and examples from reality. Problem of students’ scores stored in memory. Lecture Quiz: 3 questions about for loops, and nested for loops explained in details. | ||||||
Chapter #8 cont.: Declaring and defining an array. What is stored in a newly declared array and how to initialize it properly. Accessing array elements. scanf() in an array element. how to loop over all elements in the array. Index range checking. Arrays and Functions: 1- Pass a single element. 2- Pass multiple elements individually. 3- Pass one or more elements by address. 4- Pass the whole array (can be done only By address). | WEEK 12 | |||||
Chapter 8 cont.: Objects learned till now (Variables, Array elements, Whole Arrays). Arrays and Measures of Efficiency with examples. Exchanging values appropriately. Sorting terminology (list, pass and swap). Selection Sort: 1- Animated. 2- Solved step by step. 3-The 4 possible ways to sort a list with an exam question as an example. Bubble sort: Basic idea about how the algorithm works. | ||||||
Chapter 8 cont.: Sorting algorithms: (2) Bubble sort and (3) Selection sort with examples. Previous exams' questions. | WEEK 13 | |||||
Chapter 8 cont.: Previous exam sorting algorithm questions. Implementation of Bubble sort (Whole array vs. part of the array). Summary thoughts of sorting algorithms. Searching: (1) Sequential search: Best and worst case scenario. Implementation of a sequential search. (2) Binary search: Best case scenario. | ||||||
Chapter 8 cont.: Binary search examples: (1) Target is found in the list. (2) Target is not found. Implementation of Binary search. Highest requested previous exam questions: Spring22: Q26, Q27, Q28, Q29 and Q30. | Midterm Exam #2 - Date: Thursday, November 17 *** Time: 8:00pm - 9:30pm *** Location: ELLT 116 | WEEK 14 | ||||
  NO LECTURE - Lecture is canceled to compensate for evening midterm 2 | ||||||
  THANKSGIVING | WEEK 15 | |||||
Chapters 9 & 10: Pointers and pointer applications. What is a pointer? How to store an address in a pointer? and how to print the address stored in a pointer? Declaration of a pointer. Pointer initialization (Between functions & within the same function). Example on Pointers and Variables addresses. Arrays and Pointers with an example. Pointer Arithmetic and Arrays example. | ||||||
Chapters 9 & 10 cont.: Quick revision on pointers: motivation, applications, and how to declare, initialize and update pointers. Arrays and pointers. Pointer arithmetic and arrays: (1) Values stored in the array and (2) The addresses of each single element of the array. How to use this relationship to get a dynamic memory allocation during the runtime (malloc). An example on an array defined using malloc function. | WEEK 16 | |||||
Chapter 8 - Multidimensional Arrays: Declaration and Definition. 1D, 2D, 3D and 4D arrays. 2D arrays example. Previous final exam questions. | ||||||
Revision and previous exams' questions. | Final Exam - Date: Friday, Decemeber 16 *** Time: 01:00 - 03:00 PM *** Location: ELLT 116 |