Learn · NPTEL

Course10610523472 lectures

Programming in Modern C++

Prof. Partha Pratim Das · IIT Kharagpur

Start with lecture 1 At NPTEL

About

There has been a continual debate on which programming language/s to learn, to use. As the latest TIOBE Programming Community Index for August 2021 indicates – C (13%), Python (12%), C++ (7%), Java (10%), and C#(5%) together control nearly half the programming activities worldwide. Further, C Programming Language Family (C, C++, C#, Objective C etc.) dominate more than 25% of activities. Hence, learning C++ is important as one learns about the entire family, about Object-Oriented Programming and gets a solid foundation to also migrate to Java and Python as needed. C++ is the mother of most general purpose of languages. It is multi-paradigm encompassing procedural, object-oriented, generic, and even functional programming. C++ has primarily been the systems language till C++03 which punches efficiency of the code with the efficacy of OOP. Then, why should I learn it if my primary focus is on applications? This is where the recent updates of C++, namely, C++11 and several later offer excellent depths and flexibility for C++ that no language can match. These extensions attempt to alleviate some of the long-standing shortcomings for C++ including porous resource management, error-prone pointer handling, expression semantics, and better readability. The present course builds up on the knowledge of C programming and basic data structure (array, list, stack, queue etc.) to create a strong familiarity with C++98 / C++03. Besides the constructs, syntax and semantics of C++ (over C), we also focus on various idioms of C++ and attempt to go to depth with every C++ feature justifying and illustrating them with several examples and assignment problems. On the way, we illustrate various OOP concepts. The course also covers important advances in C++11 and later released features.

Prerequisites: Programming & Data Structure (mandatory), Programming in C (optional). Design and Analysis of Algorithms (optional).

Lectures

Week 1

  1. Lecture 01 : Course Overview YouTube
  2. Lecture 02 : IO & Loop YouTube
  3. Lecture 03 : Arrays and Strings YouTube
  4. Lecture 04 : Sorting and Searching YouTube
  5. Lecture 05 : Stack and Common Data Structures / Containers YouTube
  6. Tutorial 01 : How to build a C/C++ program?: Part 1: C Preprocessor (CPP) YouTube

Week 2

  1. Lecture 06 : Constants and Inline Functions YouTube
  2. Lecture 07 : Reference & Pointer YouTube
  3. Lecture 08 : Default Parameters & Function Overloading YouTube
  4. Lecture 09 : Operator Overloading YouTube
  5. Lecture 10 : Dynamic Memory Management YouTube
  6. Tutorial 02 : How to build a C/C++ program?: Part 2: Build Pipeline YouTube

Week 3

  1. Lecture 11 : Classes and Objects YouTube
  2. Lecture12 : Access Specifiers YouTube
  3. Lecture 13 : Constructors, Destructors & Object Lifetime YouTube
  4. Lecture 14 : Copy Constructor and Copy Assignment Operator YouTube
  5. Lecture 15 : Const-ness YouTube
  6. Tutorial 03 : How to build a C/C++ program?: Part 3: make Utility YouTube

Week 4

  1. Lecture 16 : Static Members YouTube
  2. Lecture 17 : Friend Function and friend Class YouTube
  3. Lecture 18 : Overloading Operator for User-Defined Types: Part 1 YouTube
  4. Lecture 19 : Overloading Operator for User-Defined Types: Part 2 YouTube
  5. Lecture 20 : Namespace YouTube
  6. Tutorial 04 : How to build a C/C++ program?: Part 4: Static and Dynamic Library YouTube

Week 5

  1. Lecture 21 : Inheritance: Part 1 (Inheritance Semantics) YouTube
  2. Lecture 22 : Inheritance: Part 2 (Data Member & Member Function - Override & Overload) YouTube
  3. Lecture 23 : Inheritance: Part 3 (Constructor & Destructor - Object Lifetime) YouTube
  4. Lecture 24 : Inheritance: Part 4: Phone Hierarchy YouTube
  5. Lecture 25 : Inheritance: Part 5: private & protected Inheritance YouTube
  6. Tutorial 05 : Mixing C and C++ Code: Part 1: Issues and Resolutions YouTube

Week 6

  1. Lecture 26 : Polymorphism: Part 1: Type Casting YouTube
  2. Lecture 27 : Polymorphism: Part 2: Static and Dynamic Binding YouTube
  3. Lecture 28 : Polymorphism: Part 3: Abstract Base Class YouTube
  4. Lecture 29 : Polymorphism: Part 4: Staff Salary Processing using C YouTube
  5. Lecture 30 : Polymorphism: Part 5: Staff Salary Processing using C++ YouTube
  6. Tutorial 06 : Mixing C and C++ Code: Part 2: Project Example YouTube

Week 7

  1. Lecture 31 : Virtual Function Table YouTube
  2. Lecture 32 : Type Casting & Cast Operators: Part 1 YouTube
  3. Lecture 33 : Type Casting & Cast Operators: Part 2 YouTube
  4. Lecture 34 : Type Casting & Cast Operators: Part 3 YouTube
  5. Lecture 35 : Multiple Inheritance YouTube
  6. Tutorial 07 : How to design a UDT like built-in types?: Part 1: Fraction UDT YouTube

Week 8

  1. Lecture 36 : Exceptions (Error handling in C): Part 1 YouTube
  2. Lecture 37 : Exceptions (Error handling in C++): Part 2 YouTube
  3. Lecture 38 : Template (Function Template): Part 1 YouTube
  4. Lecture 39 : Template (Class Template): Part 2 YouTube
  5. Lecture 40 : Functors: Function Objects YouTube
  6. Tutorial 08 : How to design a UDT like built-in types?: Part 2: Int and Poly UDT YouTube

Week 9

  1. Lecture 41 : Input-Output: File Handling in C YouTube
  2. Lecture 42 : Input-Output: Streams in C++ YouTube
  3. Lecture 43 : C++ Standard Library: Part 1 (Generic Programming) YouTube
  4. Lecture 44 : C++ Standard Library: Part 2 (STL) YouTube
  5. Lecture 45 : C++ Standard Library: Part 3 (STL) YouTube
  6. Tutorial 09 : How to design a UDT like built-in types?: Part 3: Updates and Mixes of UDTs YouTube

Week 10

  1. Lecture 46 : C++11 and beyond: General Features: Part 1 YouTube
  2. Lecture 47 : C++11 and beyond: General Features: Part 2 YouTube
  3. Lecture 48 : C++11 and beyond: General Features: Part 3 YouTube
  4. Lecture 49 : C++11 and beyond: General Features: Part 4: Rvalue and Move/1 YouTube
  5. Lecture 50 : C++11 and beyond: General Features: Part 5: Rvalue and Move/2 YouTube
  6. Tutorial 10 : How to optimize C++11 programs using Rvalue and Move Semantics? YouTube

Week 11

  1. Lecture 51 : C++11 and beyond: General Features: Part 6: Rvalue & Perfect Forwarding YouTube
  2. Lecture 52 : C++11 and beyond: General Features: Part 7: Lambda in C++/1 YouTube
  3. Lecture 53 : C++11 and beyond: General Features: Part 8: Lambda in C++/2 YouTube
  4. Lecture 54 : C++11 and beyond: Class Features YouTube
  5. Lecture 55 : C++11 and beyond: Non-class Types and Template Features YouTube
  6. Tutorial 11 : Compatibility of C and C++: Part 1: Significant Features YouTube

Week 12

  1. Lecture 56 : C++11 and beyond: Resource Management by Smart Pointers: Part 1 YouTube
  2. Lecture 57 : C++11 and beyond: Resource Management by Smart Pointers: Part 2 YouTube
  3. Lecture 58 : C++11 and beyond: Concurrency: Part 1 YouTube
  4. Lecture 59 : C++11 and beyond: Concurrency: Part 2 YouTube
  5. Lecture 60 : Closing Comments YouTube
  6. Tutorial 12 : Compatibility of C and C++: Part 2: Summary YouTube

Syllabus and materials

At NPTEL, as the course publishes them.

Credits and licence

Institution
IIT Kharagpur
Department
Computer Science and Engineering
Teacher
Prof. Partha Pratim Das
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