Learn · NPTEL

Course10610412855 lectures

Introduction to programming in C

Prof. Satyadev Nandakumar · IIT Kanpur

Start with lecture 1 At NPTEL

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

  1. Introduction - The Process of Programming YouTube
  2. GCD Algorithm YouTube
  3. The Programming Cycle YouTube
  4. Tracing a simple program YouTube
  5. Variables YouTube
  6. Operators YouTube

Week 2: Loop Constructs in C

  1. While Loops - I YouTube
  2. While Loop Example YouTube
  3. While Loop Example - GCD YouTube
  4. Longest Increasing Subsequence - I YouTube
  5. Longest Increasing Subsequence - 2 YouTube
  6. Longest Increasing Subsequence - 3 YouTube
  7. Do-while Loop YouTube
  8. A Matrix Problem - Nested Loops YouTube
  9. For Loops YouTube
  10. A matrix problem using nested for loops YouTube
  11. The break statement YouTube
  12. The continue statement YouTube
  13. continue example - Finding Pythagorean triples YouTube

Week 3: More on Data Types and Operations

  1. Data Types in C YouTube
  2. The ASCII code YouTube
  3. C operators and expressions - associativity YouTube
  4. Precedence of C operators YouTube
  5. Expression evaluation, comma operator YouTube
  6. Introduction to functions YouTube
  7. How functions are executed YouTube
  8. Some examples on functions - 1 YouTube
  9. Some examples on functions - 2 YouTube

Week 4: Arrays and Pointers

  1. Arrays in C YouTube
  2. Initalizing Arrays YouTube
  3. Initializing character arrays YouTube
  4. Pointers in C YouTube
  5. Pointer arithmetic YouTube
  6. Functions with pointer arguments - swap YouTube
  7. Function to copy a subarray into another YouTube
  8. Programming using arrays and pointers YouTube
  9. sizeof operator - how pointer arithmetic works YouTube
  10. Returning pointers from functions YouTube
  11. Example for returning pointers from functions - returning the duplicate of a string YouTube

Week 5: Recursion

  1. Recursion - Linear Recursion YouTube
  2. Recursion - Linear Recursion - 2 YouTube
  3. Recursion - Two-way Recursion YouTube

Week 6: Multidimensional Arrays and File Handling in C

  1. Multidimensional Arrays YouTube
  2. Multidimensional Arrays and Pointers YouTube
  3. Multidimensional Arrays and Pointers - 2 YouTube
  4. Multidimensional Arrays and Pointers - 3 YouTube
  5. File Handling YouTube
  6. Some other file-handling functions YouTube

Week 7: Structures and Linked Lists

  1. Structures in C - 1 YouTube
  2. Structures in C - 2 YouTube
  3. Singly Linked Lists YouTube
  4. Doubly Linked Lists - introduction YouTube

Week 8: Extra Topics

  1. Organizing code into multiple files - 1 YouTube
  2. Organizing code in multiple files - 2 YouTube
  3. Pre and post increment operators YouTube

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