The book is a set of examples in C/C++. Programs of varying complexity are demonstrated use of basic instructions of C/C++, input-output operation, work with arrays, with files, with structures and with objects.
For beginners programmers.
© Nikita Kultin, 2021.
CONTENTS
PART 1. BASICS OF C
Input and output
- Input of numbers
- String input
Selecting
- If-then statement
- Nested if
- Switch statement
Loops
- For statement
- While statement
Arrays
- Input, output and processing
- Average and sum of the elements
- Minimal element of array
- Sorting an array
- Sorting an array (bubble method)
- Binary search
- Matrix and vector
- Array of strings
- Two-dimensional array
Function
- Declaration and using
- Recursive function
PART 2. BASICS OF OBJECT ORIENTED PROGRAMMING
Structures
- Declaration and using
Classes and objects
- Implementation TRod class
- Implementation TPerson class
- Inheritance and polymorphism TStud and TProf classes