C++ Programming Tutorial / PDF


C++ Programming Tutorial / PDF

C++ Programming Tutorial / PDF







Table of Contents:






Introduction 
2.1 What is a computer program? 
2.2 The C++ Programming Language

3 Editing, compiling and executing a simple program 
3.1 A simple C++ program to add two numbers 
3.2 Overview of program structure and syntax 
3.3 The development environment and the development cycle 

4 INSTRUCTIONS FOR PRACTICAL SESSION 1 
4.1 Objectives 
4.2 Getting started 
4.3 Computing exercise – editing, compiling and executing a simple program that adds numbers
4.4 Exploring compiler error messages .
4.5 Compiler warnings 
4.6 Makefiles . 
4.7 Practice 
4.8 Assessment .
4.9 Instructions for submitting your self-assessed work . 

5 Variables and constants 
5.1 Variable types . 
5.2 Declaration of a variable .
5.3 Storage of variables in computer memory . 

6 Assignment of variables 
6.1 Assignment statements . 
6.2 Arithmetic expressions . 
6.3 Precedence and nesting parentheses . 
6.4 Initialisation of variables .
6.5 Expressions with mixed variable types .
6.6 Declaration and initialisation of symbolic constants .

7 Simple input and output 
7.1 Printing to the screen using output stream 
7.2 Input of data from the keyboard using input stream 

8 Control Statements 
8.1 Boolean expressions and relational operators .
8.2 Compound boolean expressions using logical operators
8.3 The IF selection control statement
8.4 The IF/ELSE selection control statement 
8.5 ELSE IF multiple selection statement 
8.6 SWITCH multiple selection statement 
8.7 The WHILE repetition control statement 
8.8 Increment and decrement operators 
8.9 The FOR repetition control statement 
8.10 The DO. . .WHILE repetition control statement .

9 INSTRUCTIONS FOR PRACTICAL SESSION 2 
9.1 Objectives 
9.2 Computing Exercises . 
9.3 Tips
9.4 Assessment 

10 INSTRUCTIONS FOR PRACTICAL SESSION 3
10.1 Objectives
10.2 Computing Exercises 
10.3 Assessment 

11 Functions 
11.1 Function definition .
11.2 Example of function definition, declaration and call . 
11.3 Function header and body . 
11.4 Function declaration .
11.5 Function call and execution . .
11.6 Function arguments . .
11.7 Another example . .
11.8 Passing by value or reference . 

12 Math library and system library built-in functions 
12.1 Mathematical functions
12.2 Random numbers . 
12.3 How can I find out what library a function is in? .

13 INSTRUCTIONS FOR PRACTICAL SESSION 4 
13.1 Objectives . 
13.2 Computing Exercises . 
13.3 The bisection method . 
13.4 Notes on algorithm and implementation . 
13.5 Assessment . 
13.6 ‘Have I done enough?’ .

14 Arrays 
14.1 Declaration . 
14.2 Array elements and indexing . 
14.3 Assigning values to array elements . 
14.4 Passing arrays to functions .
14.6 Multi-dimensional arrays 
14.7 Structures 
14.8 Enumerated constants 

15 Reading and writing to files 

16 Direct allocation of arrays with “new”

17 Modularizing 

18 Structures and packages 

19 Formatted output 

20 Notes concerning the remaining SESSIONS 5, 6 and 7. 

21 INSTRUCTIONS FOR PRACTICAL SESSION 5 : “PLANET” 
21.1 Objectives . 
21.2 Task .
21.3 Ideas for what to do . 
21.4 What to hand in . 

22 INSTRUCTIONS FOR PRACTICAL SESSION 6 : “BONKERS” 
22.1 Objectives . 
22.2 Task 
22.3 Ideas for what to do
22.4 What to hand in 

23 INSTRUCTIONS FOR PRACTICAL SESSION 7 : “RECURSION” (optional!) 
23.1 Objectives 
23.2 Recursion exercises 








 Click here for  Download PDF / FREE


C++ Programming Tutorial / PDF



1 commentaire: