C, C++ & C# in easy steps is a comprehensive guide to help you create your own programs in the C, C++ and C# programming languages, combining knowledge from the latest C, C++ and C# books in the In Easy Steps series.
Color-coded example programs together with screenshots illustrate the output when the program has been executed, making it easy to grasp.
Download the FREE sample code for checking against your own work.
All examples demonstrate C and C++ features supported by current compilers on both Windows and Linux operating systems, and demonstrate C# features in the Microsoft Visual Studio development suite – all in easy steps!
Ideal for programmers, students and novices seeking a career in computing who need a fundamental understanding of procedural programming.
Author(s): Mike McGrath
Publisher: In Easy Steps
Year: 2023
Language: English
Pages: 223
Cover
Title
Copyright
Contents
1 Getting started with C
Introducing the C language
Installing a C compiler
Writing a C program
Compiling a C program
Understanding compilation
Summary
2 Storing variable values
Creating program variables
Displaying variable values
Inputting variable values
Qualifying data types
Using global variables
Registering variables
Converting data types
Creating array variables
Describing dimensions
Summary
3 Setting constant values
Declaring program constants
Enumerating constant values
Creating a constant type
Defining constants
Debugging definitions
Summary
4 Performing Operations
Doing arithmetic
Assigning values
Comparing values
Assessing logic
Examining conditions
Measuring size
Comparing bit values
Flagging bits
Understanding precedence
Summary
5 Making statements
Testing expressions
Branching switches
Looping for a number
Looping while true
Breaking out of loops
Going to labels
Summary
6 Employing functions
Declaring functions
Supplying arguments
Calling recursively
Placing functions in headers
Restricting accessibility
Summary
7 Pointing to data
Accessing data via pointers
Doing pointer arithmetic
Passing pointers to functions
Creating arrays of pointers
Pointing to functions
Summary
8 Manipulating strings
Reading strings
Copying strings
Joining strings
Finding substrings
Validating strings
Converting strings
Summary
9 Building structures
Grouping in a structure
Defining type structures
Using pointers in structures
Pointing to structures
Passing structures to functions
Grouping in a union
Allocating memory
Summary
10 Producing results
Creating a file
Reading & writing characters
Reading & writing lines
Reading & writing entire files
Scanning filestreams
Reporting errors
Getting the date and time
Running a timer
Generating random numbers
Displaying a dialog box
Summary
11 C reference section
ASCII character codes
Input & output functions
Character test functions
String functions
Math functions
Utility functions
Diagnostic functions
Argument functions
Date & time functions
Jump functions
Signal functions
Limit constants
Float constants
12 Getting started with C++
Introducing C++
Installing a compiler
Writing your first program
Compiling & running programs
Creating variables
Employing variable arrays
Employing vector arrays
Declaring constants
Summary
13 Performing operations
Doing arithmetic
Assigning values
Comparing values
Assessing logic
Examining conditions
Establishing size
Setting precedence
Casting data types
Summary
14 Making statements
Branching with if
Switching branches
Looping for
Looping while
Declaring functions
Passing arguments
Overloading functions
Optimizing functions
Summary
15 Handling strings
Creating string variables
Getting string input
Solving the string problem
Discovering string features
Joining & comparing strings
Copying & swapping strings
Finding substrings
Replacing substrings
Summary
16 Reading and writing files
Writing a file
Appending to a file
Reading characters & lines
Formatting with getline
Manipulating input & output
Predicting problems
Recognizing exceptions
Handling errors
Summary
17 Pointing to data
Understanding data storage
Getting values with pointers
Doing pointer arithmetic
Passing pointers to functions
Making arrays of pointers
Referencing data
Passing references to functions
Comparing pointers & references
Summary
18 Creating classes and objects
Encapsulating data
Creating an object
Creating multiple objects
Initializing class members
Overloading methods
Inheriting class properties
Calling base constructors
Overriding base methods
Summary
19 Harnessing polymorphism
Pointing to classes
Calling a virtual method
Directing method calls
Providing capability classes
Making abstract data types
Building complex hierarchies
Isolating class structures
Employing isolated classes
Summary
20 Processing macros
Exploring compilation
Defining substitutes
Defining conditions
Providing alternatives
Guarding inclusions
Using macro functions
Building strings
Debugging assertions
Summary
21 Programming visually
Starting a Universal project
Inserting page components
Importing program assets
Designing the layout
Adding runtime function
Testing the program
Adjusting the interface
Deploying the application
Summary
22 Getting started with C#
Introducing C#
Installing Visual Studio
Exploring the IDE
Starting a Console project
Running a Console project
Following the rules
Summary
23 Storing values
Creating variables
Reading input
Employing arrays
Casting data types
Fixing constants
Summary
24 Performing operations
Doing arithmetic
Assigning values
Comparing values
Assessing logic
Examining conditions
Setting precedence
Summary
25 Making statements
Branching with if
Switching branches
Looping for
Looping while
Iterating for each
Summary
26 Devising methods
Creating function
Passing arguments
Overloading methods
Refactoring code
Summary
27 Handling strings
Discovering string features
Manipulating strings
Joining and comparing strings
Copying and swapping strings
Finding substrings
Formatting strings
Formatting date strings
Summary
28 Accessing files
Writing a file
Appending to a file
Reading text and lines
Streaming lines
Manipulating input and output
Summary
29 Solving problems
Detecting real-time errors
Fixing compile-time errors
Debugging code
Setting breakpoints
Catching runtime errors
Getting help
Summary
30 Creating objects
Encapsulating data
Creating multiple objects
Initializing class members
Inheriting class properties
Calling base constructors
Hiding base methods
Directing method calls
Providing capability classes
Employing partial classes
Summary
31 Controlling events
Starting a Forms project
Adding visual controls
Writing functional code
Gathering text entries
Ticking option boxes
Showing user messages
Calling system dialogs
Creating application menus
Making menus work
Importing audio resources
Summary
32 Building an application
Planning the program
Assigning fixed properties
Designing the layout
Setting dynamic properties
Adding runtime function
Testing the program
Publishing the application
Summary
33 Targeting devices
Starting a Universal project
Inserting page components
Importing program assets
Designing the layout
Adding runtime function
Testing the program
Adjusting the interface
Deploying the application
Summary
Back Cover