Online course · Development

C & C++ Programming Fundamentals for Engineers

Learn C and C++ by building real shop-floor tools, from first compile to a tested CLI

Created by TrainSkool Trainer

C & C++ Programming Fundamentals for Engineers course cover

Coming soon Launch price ₹999

This course is not open for enrolment yet.

About this course

For engineering students, diploma holders and technicians who need a first programming language for embedded, automation, CNC and industrial IoT work. No prior programming is assumed. You follow one running example all the way: Kovai Precision Components, a fictional CNC machine shop in Coimbatore, whose trainee engineer writes small shop-floor tools for shift reports, scrap cost in rupees and spindle-temperature alerts. You will compile and run C programs with GCC, use types, operators, decisions, loops and functions, arrays, strings, pointers and structs, manage memory with malloc and free and catch bugs with sanitizers, move to C++ classes, RAII and the standard library, and read, validate and report on CSV files with proper error handling. The capstone is shiftrep, a command-line report tool with a Makefile, an automated test suite and a 100-point rubric. Included: 28 text lessons with tested examples, slides and quick checks in every lesson, 26 auto-checked C and C++ exercises that run in the browser, seven chapter projects, chapter quizzes, a rubric-graded capstone, a 20-question final exam and a certificate of completion. Lessons are text and slides; trainer videos are coming later. Covers C17 and C++17, with notes on C23 and C++20. Tools such as GCC, MSYS2, WSL and Visual Studio Code are named descriptively; TrainSkool is not affiliated with or endorsed by their makers. What you will be able to do: - You will be able to compile, run and debug C programs with GCC using explicit standards and warning flags. - You will be able to write recursive functions, reason about scope, lifetime and static, and split code across header and source files. - You will be able to use types, integer arithmetic, decisions, loops and functions to compute exact results such as yield and rupee totals in paise. - You will be able to work safely with arrays, C strings and pointers, including bounds checks, null terminators and pass-by-pointer. - You will be able to model records with structs and manage dynamic memory with malloc, realloc and free, and find leaks and overflows with sanitizers. - You will be able to write C++ classes with constructors and invariants, use RAII, std::string, std::vector, std::map and standard algorithms. - You will be able to read, validate and write files, reporting bad records precisely and signalling results with return codes, exit statuses and exceptions. - You will be able to build a multi-file command-line tool with a Makefile and an automated end-to-end test suite.

What you'll learn

  • Compile, run and debug C programs with GCC using explicit standards and warning flags
  • Use types, integer arithmetic, decisions, loops and functions to compute exact results such as yield and rupee totals in paise
  • Write recursive functions, reason about scope, lifetime and static, and split code across header and source files
  • Work safely with arrays, C strings and pointers, including bounds checks, null terminators and pass-by-pointer
  • Model records with structs and manage dynamic memory with malloc, realloc and free, and find leaks and overflows with sanitizers
  • Write C++ classes with constructors and invariants, use RAII, std::string, std::vector, std::map and standard algorithms
  • Read, validate and write files, reporting bad records precisely and signalling results with return codes, exit statuses and exceptions
  • Build a multi-file command-line tool with a Makefile and an automated end-to-end test suite

Course content

Chapter 1 · Module 1: Getting Started — Variables, Types and Operators

  • Code lab: How a C Program Is Built: Source, Compiler and ExecutableC is the language underneath most of the machines an engineer touches.18 topics · 26 min
  • Code lab: Variables and Fundamental Types: int, double, char and Their LimitsA program is only as correct as the boxes it keeps its numbers in. In C you choose the box yourself: how big it is, whether it can hold fractions, whether it can go negative.18 topics · 27 min
  • Code lab: Operators and Expressions: Integer Division, Remainder, Casts and PrecedenceMost bugs in beginner C code are not exotic. They are an expression that the programmer read one way and the compiler read another.18 topics · 27 min
  • Code lab: Talking to the User: printf, scanf and Standard InputA tool that cannot take input is a demo.25 topics · 28 min

Chapter 2 · Module 2: Control Flow — Decisions and Loops

  • Code lab: Making Decisions: if, else and Logical OperatorsSo far every program has done the same thing for every input. Real tools decide.18 topics · 27 min
  • Code lab: switch Statements and EnumerationsShop-floor data is full of codes. A shift is A, B or C.17 topics · 26 min
  • Code lab: Loops: while, for and do-whileA shift log at KPC is not one record; it is 24 records a day (8 machines times 3 shifts), about 7,200 a year, and more once sensors log every minute.20 topics · 27 min
  • Code lab: Loop Patterns: Nested Loops, break, continue and Reading Until End of InputThe previous lesson's loops knew how many records were coming. Real logs rarely say.26 topics · 28 min

Chapter 3 · Module 3: Functions and Scope

  • Code lab: Writing Functions: Parameters, Return Values and PrototypesBy the end of chapter 2 Divya's log scanner had the yield formula in three places, the rupee printing in two and the temperature rules in two.18 topics · 28 min
  • Code lab: Scope, Lifetime, static and Splitting Code Across FilesDivya's tools are growing.17 topics · 28 min
  • Code lab: Recursion and the Call StackThe maintenance team at KPC rebuilds gearboxes on the bar feeders and coolant pumps.27 topics · 26 min

Chapter 4 · Module 4: Arrays, Strings and Pointers

  • Code lab: Arrays: Fixed-Size Storage, Indexing and BoundsSenthil's weekly review is per machine: how many good parts did CNC-03 make across all its shifts, and which machine had no records at all because its log sheet went missing?19 topics · 27 min
  • Code lab: C Strings: Character Arrays, the Null Terminator and string.hMachine IDs are typed by people, and people are inconsistent. On one week of KPC log sheets Divya found CNC-03, cnc-3, CNC03, " CNC-03 " with stray spaces and, once, CNC-3A.17 topics · 29 min
  • Code lab: Pointers: Addresses, Dereferencing and Pass-by-PointerSince chapter 1 you have written scanf("%d", &ok) with a promise that the & would be explained later.21 topics · 29 min
  • Code lab: Pointers and Arrays Together: Pointer Arithmetic, const and 2D ArraysTwo questions from the previous lessons are still open. 3 explained addresses.27 topics · 29 min

Chapter 5 · Module 5: Structs and Basic Memory Management

  • Code lab: Structs: Grouping Related Data and Arrays of StructsA shift record at KPC is five facts that belong together: machine, shift, good parts, rejected parts and spindle temperature.17 topics · 28 min
  • Code lab: Dynamic Memory: malloc, calloc, realloc and freeDivya's log reader from the previous lesson holds at most 100 records.18 topics · 30 min
  • Code lab: Memory Bugs and How to Catch Them: Leaks, Dangling Pointers and OverflowsC gives you direct control of memory and asks for discipline in return.29 topics · 29 min

Chapter 6 · Module 6: Introduction to C++ — Classes and Objects

  • Code lab: From C to C++: iostream, std::string, std::vector and ReferencesLook back at what chapters 4 and 5 asked of you: count the terminator in every string buffer, pass a size with every array, realloc into a temporary, free every block exactly once on every path, and…20 topics · 28 min
  • Code lab: Classes and Objects: Members, Constructors and InvariantsIn chapter 5 the per-machine totals were a struct whose members anyone could change.20 topics · 29 min
  • Code lab: RAII, Destructors and Smart PointersEvery C function in chapter 5 that acquired something had to remember to release it: free the list on the success path, on the out-of-memory path and on the empty-log path.19 topics · 28 min
  • Code lab: The Standard Library at Work: Algorithms, Lambdas, std::map and a First Look at InheritanceSenthil's Monday questions are always the same three: which shifts ran hottest, how many readings crossed the warning line, and how each machine did over the week.27 topics · 30 min

Chapter 7 · Module 7: File I/O and Basic Error Handling

  • Code lab: Reading and Writing Files in C: fopen, fgets, fprintf and fcloseUntil now every program has read standard input and written standard output, and the shell connected those streams to files with < and >.18 topics · 27 min
  • Code lab: Parsing and Validating Input Safely: strtol, strtod and Bad Records0 C, and the last line has only five fields. A report that silently accepts them is wrong, and a report that crashes on them is useless.18 topics · 30 min
  • Code lab: Error Handling: Return Codes, errno, Exit Status and C++ ExceptionsThe nightly job on KPC's shop-floor PC is a short script: run the report tool on the day's export, and if anything went wrong, email Senthil.24 topics · 29 min

Chapter 8 · Module 8: Capstone — Build shiftrep, a Command-Line Shift Report Tool

  • Reading: Capstone Brief: Requirements, Design and Step-by-Step Build Plan for shiftrepSenthil Kumar, maintenance head at Kovai Precision Components, has run Divya's small tools for seven chapters.11 topics · 45 min
  • Code lab: Command-Line Arguments, Build Scripts and Testing Your ToolA tool becomes a product when other people can run it without reading its source.18 topics · 30 min
  • Assignment: Capstone Deliverables, Demo Script and Grading RubricSubmit one zip file (or a link to a git repository) named shiftrep-YOURNAME containing exactly the following.13 topics · 30 min

Assessments and certificate

  • Module 1 quiz: Getting Started — Variables, Types and Operators8 questions · 15 min · pass mark 70%
  • Module 2 quiz: Control Flow — Decisions and Loops8 questions · 15 min · pass mark 70%
  • Module 3 quiz: Functions and Scope8 questions · 15 min · pass mark 70%
  • Module 4 quiz: Arrays, Strings and Pointers8 questions · 15 min · pass mark 70%
  • Module 5 quiz: Structs and Basic Memory Management8 questions · 15 min · pass mark 70%
  • Module 6 quiz: Introduction to C++ — Classes and Objects8 questions · 15 min · pass mark 70%
  • Module 7 quiz: File I/O and Basic Error Handling8 questions · 15 min · pass mark 70%
  • Module 8 quiz: Capstone — Build shiftrep, a Command-Line Shift Report Tool7 questions · 15 min · pass mark 70%
  • C & C++ Programming Fundamentals for Engineers — final assessment20 questions · 40 min · pass mark 70%

Related courses

Frequently asked questions

Can I get a refund for C & C++ Programming Fundamentals for Engineers?

Yes. You can request a full refund within 7 days of purchase, provided you have completed no more than 25% of the lessons, not started the final exam and not been issued a certificate. Pre-orders of a course that has not launched yet can be refunded in full any time before launch. Email refunds@trainskool.com with your order reference; approved refunds go back to your original payment method.

How long do I have access to the course?

Lifetime access. A one-time payment of ₹999 keeps the course in your TrainSkool learning dashboard, on the web and in the TrainSkool apps, with no subscription to cancel.

Do I get a certificate?

Yes. TrainSkool issues a certificate when you meet the course requirements, including passing its 9 graded assessments. Every certificate has a public verification link that employers can check.

Are there any prerequisites?

No. The course is designed for beginners and starts from the fundamentals.

How is the course delivered?

Online and self-paced: 8 modules and 28 lessons, about 13h 25m of study, with graded assessments. Learn in your browser or the TrainSkool Android and Windows apps.