# Programming in Modern C++

- Institution: IIT Kharagpur
- Department: Computer Science and Engineering
- Teacher: Prof. Partha Pratim Das
- Level: Undergraduate
- Language: English
- Subjects: Computer science, Engineering
- Source: [NPTEL](https://nptel.ac.in/courses/106105234)
- Licence: [CC BY-NC-SA](https://nptel.ac.in/faq) (Non-commercial use only.)
- Syllabus: [at the source](https://nptel.ac.in/courses/106105234)
- Who can watch: Tweens profiles and older (sources give no ratings; placed by Invisible Network from the source's own words)

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 &amp; Data Structure (mandatory), Programming in C (optional). Design and Analysis of Algorithms (optional).

## Lectures

1. [Lecture 01 : Course Overview](https://invisiblenetwork.ai/learn/nptel/106105234/4d3d257b28f0) (YouTube)
2. [Lecture 02 : IO & Loop](https://invisiblenetwork.ai/learn/nptel/106105234/3a39f1233000) (YouTube)
3. [Lecture 03 : Arrays and Strings](https://invisiblenetwork.ai/learn/nptel/106105234/f750f999d1c3) (YouTube)
4. [Lecture 04 : Sorting and Searching](https://invisiblenetwork.ai/learn/nptel/106105234/e86e650f2815) (YouTube)
5. [Lecture 05 : Stack and Common Data Structures / Containers](https://invisiblenetwork.ai/learn/nptel/106105234/4205570c7c29) (YouTube)
6. [Tutorial 01 : How to build a C/C++ program?: Part 1: C Preprocessor (CPP)](https://invisiblenetwork.ai/learn/nptel/106105234/6ed993bba731) (YouTube)
7. [Lecture 06 : Constants and Inline Functions](https://invisiblenetwork.ai/learn/nptel/106105234/46917617af00) (YouTube)
8. [Lecture 07 : Reference & Pointer](https://invisiblenetwork.ai/learn/nptel/106105234/1f4387483978) (YouTube)
9. [Lecture 08 : Default Parameters & Function Overloading](https://invisiblenetwork.ai/learn/nptel/106105234/1001a74a0e54) (YouTube)
10. [Lecture 09 : Operator Overloading](https://invisiblenetwork.ai/learn/nptel/106105234/cb256c9d2903) (YouTube)
11. [Lecture 10 : Dynamic Memory Management](https://invisiblenetwork.ai/learn/nptel/106105234/90be342307e0) (YouTube)
12. [Tutorial 02 : How to build a C/C++ program?: Part 2: Build Pipeline](https://invisiblenetwork.ai/learn/nptel/106105234/6074944e319f) (YouTube)
13. [Lecture 11 : Classes and Objects](https://invisiblenetwork.ai/learn/nptel/106105234/89cf7d7d5055) (YouTube)
14. [Lecture12 : Access Specifiers](https://invisiblenetwork.ai/learn/nptel/106105234/46bf24b30c03) (YouTube)
15. [Lecture 13 : Constructors, Destructors & Object Lifetime](https://invisiblenetwork.ai/learn/nptel/106105234/45ae39b8f15e) (YouTube)
16. [Lecture 14 : Copy Constructor and Copy Assignment Operator](https://invisiblenetwork.ai/learn/nptel/106105234/92c1dc91d19a) (YouTube)
17. [Lecture 15 : Const-ness](https://invisiblenetwork.ai/learn/nptel/106105234/774f68f26d91) (YouTube)
18. [Tutorial 03 : How to build a C/C++ program?: Part 3: make Utility](https://invisiblenetwork.ai/learn/nptel/106105234/9cf8ea3e0cb3) (YouTube)
19. [Lecture 16 : Static Members](https://invisiblenetwork.ai/learn/nptel/106105234/c332c1ef444c) (YouTube)
20. [Lecture 17 : Friend Function and friend Class](https://invisiblenetwork.ai/learn/nptel/106105234/ef5cb53ab5ee) (YouTube)
21. [Lecture 18 : Overloading Operator for User-Defined Types: Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/36e07194ca44) (YouTube)
22. [Lecture 19 : Overloading Operator for User-Defined Types: Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/1a0521c18daf) (YouTube)
23. [Lecture 20 : Namespace](https://invisiblenetwork.ai/learn/nptel/106105234/e8b028b05b59) (YouTube)
24. [Tutorial 04 : How to build a C/C++ program?: Part 4: Static and Dynamic Library](https://invisiblenetwork.ai/learn/nptel/106105234/b01be39bc42e) (YouTube)
25. [Lecture 21 : Inheritance: Part 1 (Inheritance Semantics)](https://invisiblenetwork.ai/learn/nptel/106105234/da936fb0b075) (YouTube)
26. [Lecture 22 : Inheritance: Part 2 (Data Member & Member Function - Override & Overload)](https://invisiblenetwork.ai/learn/nptel/106105234/c0501c078346) (YouTube)
27. [Lecture 23 : Inheritance: Part 3 (Constructor & Destructor - Object Lifetime)](https://invisiblenetwork.ai/learn/nptel/106105234/03a6811d50b4) (YouTube)
28. [Lecture 24 : Inheritance: Part 4: Phone Hierarchy](https://invisiblenetwork.ai/learn/nptel/106105234/08c26230dca3) (YouTube)
29. [Lecture 25 : Inheritance: Part 5: private & protected Inheritance](https://invisiblenetwork.ai/learn/nptel/106105234/0cf7164014dc) (YouTube)
30. [Tutorial 05 : Mixing C and C++ Code: Part 1: Issues and Resolutions](https://invisiblenetwork.ai/learn/nptel/106105234/f7af40cf5c72) (YouTube)
31. [Lecture 26 : Polymorphism: Part 1: Type Casting](https://invisiblenetwork.ai/learn/nptel/106105234/668f7b49895c) (YouTube)
32. [Lecture 27 : Polymorphism: Part 2: Static and Dynamic Binding](https://invisiblenetwork.ai/learn/nptel/106105234/4e921a65c9ec) (YouTube)
33. [Lecture 28 : Polymorphism: Part 3: Abstract Base Class](https://invisiblenetwork.ai/learn/nptel/106105234/7aaf14b8278f) (YouTube)
34. [Lecture 29 : Polymorphism: Part 4: Staff Salary Processing using C](https://invisiblenetwork.ai/learn/nptel/106105234/cb5ee9fedc51) (YouTube)
35. [Lecture 30 : Polymorphism: Part 5: Staff Salary Processing using C++](https://invisiblenetwork.ai/learn/nptel/106105234/699b2b3a9b50) (YouTube)
36. [Tutorial 06 : Mixing C and C++ Code: Part 2: Project Example](https://invisiblenetwork.ai/learn/nptel/106105234/c57dcf185aba) (YouTube)
37. [Lecture 31 : Virtual Function Table](https://invisiblenetwork.ai/learn/nptel/106105234/ff91d43df70d) (YouTube)
38. [Lecture 32 : Type Casting & Cast Operators: Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/6c14bb8bdc4c) (YouTube)
39. [Lecture 33 : Type Casting & Cast Operators: Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/8e4259703d2b) (YouTube)
40. [Lecture 34 : Type Casting & Cast Operators: Part 3](https://invisiblenetwork.ai/learn/nptel/106105234/41995e2afa82) (YouTube)
41. [Lecture 35 : Multiple Inheritance](https://invisiblenetwork.ai/learn/nptel/106105234/f644b12af170) (YouTube)
42. [Tutorial 07 : How to design a UDT like built-in types?: Part 1: Fraction UDT](https://invisiblenetwork.ai/learn/nptel/106105234/562265d6285d) (YouTube)
43. [Lecture 36 : Exceptions (Error handling in C): Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/3973a383654f) (YouTube)
44. [Lecture 37 : Exceptions (Error handling in C++): Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/cf7d5c7bda51) (YouTube)
45. [Lecture 38 : Template (Function Template): Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/f08bacfb153c) (YouTube)
46. [Lecture 39 : Template (Class Template): Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/3847cf7a7356) (YouTube)
47. [Lecture 40 : Functors: Function Objects](https://invisiblenetwork.ai/learn/nptel/106105234/c1207d68ba90) (YouTube)
48. [Tutorial 08 : How to design a UDT like built-in types?: Part 2: Int and Poly UDT](https://invisiblenetwork.ai/learn/nptel/106105234/d46ad133005f) (YouTube)
49. [Lecture 41 : Input-Output: File Handling in C](https://invisiblenetwork.ai/learn/nptel/106105234/e0fec8c40332) (YouTube)
50. [Lecture 42 : Input-Output: Streams in C++](https://invisiblenetwork.ai/learn/nptel/106105234/51b4070e7fdb) (YouTube)
51. [Lecture 43 : C++ Standard Library: Part 1 (Generic Programming)](https://invisiblenetwork.ai/learn/nptel/106105234/a7c1f8aaa6c7) (YouTube)
52. [Lecture 44 : C++ Standard Library: Part 2 (STL)](https://invisiblenetwork.ai/learn/nptel/106105234/39f5e762c42c) (YouTube)
53. [Lecture 45 : C++ Standard Library: Part 3 (STL)](https://invisiblenetwork.ai/learn/nptel/106105234/181135bb9605) (YouTube)
54. [Tutorial 09 : How to design a UDT like built-in types?: Part 3: Updates and Mixes of UDTs](https://invisiblenetwork.ai/learn/nptel/106105234/fa619feee58a) (YouTube)
55. [Lecture 46 : C++11 and beyond: General Features: Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/30cdbaadf773) (YouTube)
56. [Lecture 47 : C++11 and beyond: General Features: Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/9dfe1151344a) (YouTube)
57. [Lecture 48 : C++11 and beyond: General Features: Part 3](https://invisiblenetwork.ai/learn/nptel/106105234/ee572876431c) (YouTube)
58. [Lecture 49 : C++11 and beyond: General Features: Part 4: Rvalue and Move/1](https://invisiblenetwork.ai/learn/nptel/106105234/255a5ab6ef4f) (YouTube)
59. [Lecture 50 : C++11 and beyond: General Features: Part 5: Rvalue and Move/2](https://invisiblenetwork.ai/learn/nptel/106105234/a33ece7e361b) (YouTube)
60. [Tutorial 10 : How to optimize C++11 programs using Rvalue and Move Semantics?](https://invisiblenetwork.ai/learn/nptel/106105234/0441ddfaeb66) (YouTube)
61. [Lecture 51 : C++11 and beyond: General Features: Part 6: Rvalue & Perfect Forwarding](https://invisiblenetwork.ai/learn/nptel/106105234/f19778e2f527) (YouTube)
62. [Lecture 52 : C++11 and beyond: General Features: Part 7: Lambda in C++/1](https://invisiblenetwork.ai/learn/nptel/106105234/df4c6cd050f4) (YouTube)
63. [Lecture 53 : C++11 and beyond: General Features: Part 8: Lambda in C++/2](https://invisiblenetwork.ai/learn/nptel/106105234/97891b705ed5) (YouTube)
64. [Lecture 54 : C++11 and beyond: Class Features](https://invisiblenetwork.ai/learn/nptel/106105234/50ba8b52c6c1) (YouTube)
65. [Lecture 55 : C++11 and beyond: Non-class Types and Template Features](https://invisiblenetwork.ai/learn/nptel/106105234/63ad1b5b35d4) (YouTube)
66. [Tutorial 11 : Compatibility of C and C++: Part 1: Significant Features](https://invisiblenetwork.ai/learn/nptel/106105234/1d4d87fb95ab) (YouTube)
67. [Lecture 56 : C++11 and beyond: Resource Management by Smart Pointers: Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/1f6645d48ec7) (YouTube)
68. [Lecture 57 : C++11 and beyond: Resource Management by Smart Pointers: Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/acdd62c69d55) (YouTube)
69. [Lecture 58 : C++11 and beyond: Concurrency: Part 1](https://invisiblenetwork.ai/learn/nptel/106105234/2fa92b4137d8) (YouTube)
70. [Lecture 59 : C++11 and beyond: Concurrency: Part 2](https://invisiblenetwork.ai/learn/nptel/106105234/64eca2100cfe) (YouTube)
71. [Lecture 60 : Closing Comments](https://invisiblenetwork.ai/learn/nptel/106105234/98432fb90f7a) (YouTube)
72. [Tutorial 12 : Compatibility of C and C++: Part 2: Summary](https://invisiblenetwork.ai/learn/nptel/106105234/f4f81d2e591d) (YouTube)
