Learn · Introduction to programming in C
Lecture 9 of 55Week 2: Loop Constructs in C
While Loop Example - GCD
Prof. Satyadev Nandakumar · IIT Kanpur
Credits and licence
- From
- Introduction to programming in C, IIT Kanpur (at NPTEL)
- Licence
- CC BY-NC-SA, as NPTEL states it. Non-commercial use only.
- Attribution
- NPTEL states: "Distributed under Creative Commons Attribution-ShareAlike / CC BY - NC - SA", beside a BY-NC-SA badge.
- Who can watch
- Tweens profiles and older. How courses are placed
All the lectures
- Introduction - The Process of Programming
- GCD Algorithm
- The Programming Cycle
- Tracing a simple program
- Variables
- Operators
- While Loops - I
- While Loop Example
- While Loop Example - GCD
- Longest Increasing Subsequence - I
- Longest Increasing Subsequence - 2
- Longest Increasing Subsequence - 3
- Do-while Loop
- A Matrix Problem - Nested Loops
- For Loops
- A matrix problem using nested for loops
- The break statement
- The continue statement
- continue example - Finding Pythagorean triples
- Data Types in C
- The ASCII code
- C operators and expressions - associativity
- Precedence of C operators
- Expression evaluation, comma operator
- Introduction to functions
- How functions are executed
- Some examples on functions - 1
- Some examples on functions - 2
- Arrays in C
- Initalizing Arrays
- Initializing character arrays
- Pointers in C
- Pointer arithmetic
- Functions with pointer arguments - swap
- Function to copy a subarray into another
- Programming using arrays and pointers
- sizeof operator - how pointer arithmetic works
- Returning pointers from functions
- Example for returning pointers from functions - returning the duplicate of a string
- Recursion - Linear Recursion
- Recursion - Linear Recursion - 2
- Recursion - Two-way Recursion
- Multidimensional Arrays
- Multidimensional Arrays and Pointers
- Multidimensional Arrays and Pointers - 2
- Multidimensional Arrays and Pointers - 3
- File Handling
- Some other file-handling functions
- Structures in C - 1
- Structures in C - 2
- Singly Linked Lists
- Doubly Linked Lists - introduction
- Organizing code into multiple files - 1
- Organizing code in multiple files - 2
- Pre and post increment operators