Course10610412855 lectures
Introduction to programming in C
Prof. Satyadev Nandakumar · IIT Kanpur
About
This is a course in programming in C. No prior programming experience is assumed; however, mathematical maturity at the level of a second year science or engineering undergraduate is assumed.
We emphasize solving problems using the language, and introduce standard programming techniques like alternation, iteration and recursion. We will briefly glimpse the basics of software engineering practices like modularization, commenting, and naming conventions which help in collaborating and programming in teams.
Given a problem, we pay attention to the following questions:
What is an algorithmic solution to the problem?
How do we translate the algorithm into C code?
How efficient is the code?
How maintainable is the code?
It is expected that by the end of the course, students will be comfortable in :-
Attempting algorithmic solutions to problems
Designing and coding moderate sized programs running to the order of a few hundred lines of code, and
Reading, understanding and modifying code written by others.
INTENDED AUDIENCE : Any interested learners.
Lectures
Week 1: Introduction - Variables, Expressions and Conditionals
- Introduction - The Process of Programming
- GCD Algorithm
- The Programming Cycle
- Tracing a simple program
- Variables
- Operators
Week 2: Loop Constructs in C
- 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
Week 3: More on Data Types and Operations
- 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
Week 4: Arrays and Pointers
- 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
Week 5: Recursion
Week 6: Multidimensional Arrays and File Handling in C
- Multidimensional Arrays
- Multidimensional Arrays and Pointers
- Multidimensional Arrays and Pointers - 2
- Multidimensional Arrays and Pointers - 3
- File Handling
- Some other file-handling functions
Week 7: Structures and Linked Lists
Week 8: Extra Topics
Syllabus and materials
At NPTEL, as the course publishes them.
Credits and licence
- Institution
- IIT Kanpur
- Department
- Computer Science and Engineering
- Teacher
- Prof. Satyadev Nandakumar
- Level
- Undergraduate
- Language
- English
- Subjects
- Computer science, Engineering
- Source
- NPTEL
- Licence
- CC BY-NC-SA, as NPTEL states it. Non-commercial use only. NPTEL's terms
- Attribution
- NPTEL states: "Distributed under Creative Commons Attribution-ShareAlike / CC BY - NC - SA", beside a BY-NC-SA badge.
- Who can watch
- NPTEL gives no rating. Invisible Network shows it to Tweens profiles and older, judged from what the source says about it. How courses are placed