Duration
5 days
WHAT YOU WILL LEARN
This five-day instructor-led course provides to teach the basic of C/C++ language.
The approach used is theory followed by powerful seriously designed exercises to reinforce the understanding of the theory.
Besides the language syntax, many aspects of the course are intended to make the participants as better software developer, especially using C++ as programming tool. Many of the aspects covered in this course will benefit the participants in many other project developments.
This course does not cover the OOP aspect of C++ in detail. It is focusing on most of the language construct that can be used for both C and C++.
However, this course is specially designed for engineers by including additional module and using exercises that related to their works.
Upon completion of this course, participants should be able to:
- Apply different programming constructs in C++ appropriately.
- Solve moderate size problems using C++.
- Understand the how to work in a team in software development with C++.
- To use C++ as better C.
- Use IDE to create a moderate size of project.
AUDIENCE
This course is for engineers from various deciplines who intend to learn C++.
PREREQUISITES
Before attending this course, students must have:
- Basic understanding of operating system.
- Basic knowledge of computer hardware.
- Basic programming concept will be added advantage.
METHODOLOGY
This program will be conducted with interactive lectures, PowerPoint presentation, discussions and practical exercise.
Module 1: Introducing to the IDE
This module explains how to use the Integrated Development environment for developing C++ program/project
Lessons
- The project templates
- The editor
- The compiler
- The main() function
- Different type of programming errors
- Using debugger
- How to get help
- Running the program
Module 2: C/C++ fundamentals
This module will brief students the fundamental features of C/C++ language constructs
Lessons
- Identifier and the rules in naming
- Single line and block comments
- Command line arguments
- The return value from main() function
- Functions as building block
- Naming Convention
- Sequential Statements
- Simple I/O with cin and cout classes
- Preprocessing
- Macro constant
- Macro Functions
- const Vs. macro constants
Module 3: Conditional statements
This module will cover various conditional statements in C/C++
Lessons
- Conditions, Composite conditions, and Boolean logic
- Zero is false, none zero is true
- “Short circuit” in composite conditions
- Branching Statement
- Unconditional goto Statement
- if-Then, if-Then-else, and Nested If
- switch..case..default Statement
Module 4: Iteration Statements
This module explains various types of iteration statements in C/C++
Lessons
- do-while statement
- while–do statement
- for statement
- goto statement
- break statement in iteration
- continue statement in iteration
- Busy loop
- The principal of “One in one out”
Module 5: Data Types
This module explains various data types in C/C++.
Lessons
- Data Types Concept
- Number of bytes needed for representing the data
- Value range represented
- Acceptable Value types
- Valid operations on the data
- Simple/native data types
- The sizeof keyword
- Variables
- Variable naming: Pascal and camel styles
- Declaration and Scoping
- Shadowing and Scope resolution operator
- Type casting
- Bit Fields
- Union
- New types in C++
Module 6: Storage class
This module explains the meaning of storage class, and relates it to the variable/object life cycle.
Lessons
- Data segment, Stack, and Heap
- auto, static, extern and register keywords
- Constraint on the register variables
- Register parameters
- Variable/Object Life Cycle
Module 7: Expressions and operators
This module explains expression and operator concept in C/C++ programs
Lessons
- Operators and operands
- The expression
- Operators
- Arity
- Precedence
- Association
- Operator Types
- Assignment
- Arithmetic
- Comparison
- Logical
- Bitwise
- Pitfall of the / operator
- The new rules of assignment operator in C++
Module 8: Compiler directives and constants
This module explains various important compiler directives and constants used in C/C++ programs
Lessons
- Compiler directives
- #include
- #define
- #if .. #elif .. #else..#endif
- #ifdef
- #error
- #undef
- #pragma
- ##
- Compiler Constants
- __FILE__
- __LINE__
- __DATE__
- __TIME__
- __cplusplus
Module 9: Pointers
This module explains pointer concept in C/C++, which is one of the most challenging aspects of the language.
Lessons
- Pointers is simple/native type
- The value Vs address of the storage.
- Parameter passing by value for pointer
- The power of indirect access
- Pointer casting
- void pointer
- Pointer of pointers
- Pointer to functions
Module 10: Character and String
This module explains the character and string concepts
Lessons
- char as integer type
- Coding scheme
- ASCII
- Unicode
- Code Vs value
- Control characters
- Characters and String
- String terminator
- Escape characters in string
- String manipulation
- Concatenation
- Trimming
- Etc.
- String and pointer
- Standard string manipulation functions
Module 11: Complex types
This module explains the concept of complex types in C/C++. More details explanation covered both homogenous and heterogeneous complex types.
Lessons
- Homogeneous Complex Data Type:Array
- Array indexing and out of bound issue
- Open declaration
- Optional last comma
- The use of sizeof keyword on array
- Multidimensional Array
- Array and pointers
- Heterogeneous Complex Types: struct (Record)
- Accessing items in a record
- Pointer to record
- The . and -> operator
- Record of record
- Array of Record
Module 12: Dynamic Allocation
This module explains the concept of dynamic allocation and understand why it is needed in C/C++.
Lessons
- Non deterministic during compile time: Dynamic Allocation
- The Heap story
- new operator Vs malloc function
- delete operator Vs free function
- The different between delete and delete[]
- Dynamic allocation and pointers
- Issues with dynamic allocation
- Memory leaking
- Memory fragmentation
- Pointer overrun
Module 13: Functions
This module explains more features about functions in C++
Lessons
- Function prototyping
- Multiple modules project
- static functions
- Header files
- What should be there?
- Parameter passing by value
- Passing address as value using pointer parameter
- The Synonym and Parameter passing by reference
- Function Overloading
- Default parameter value
- Function return types
- Complex return
- Return by reference
- Recursive function call
- auto variables and static variables
- Stack overflow
Module 14 – Numerical Analysis
- Introduction to Root Finding
- The Bisection Method
- Refinements to the Bisection Method
- The Secant Method
- Introduction to Numerical Integration
- The Trapezoidal Rule
- Simpson’s Rule
- Common Programming Errors
Programme scope, delivery arrangements and suitability are confirmed during enquiry.