Learn To Program In C

Class Description:

The C programming language is nearly 50 years old but still the most popular.
Compilers for this language can be found for practically every computing
platform or device, from huge supercomputers to your calculator or phone.

In this course you will learn to use the C language to write programs on your PC
and see examples of programming on other platforms such as microcontrollers and
single board computers.

Requirements:

No previous programming experience is necessary but basic computer skills are required.

Please bring a Windows laptop to the class if you have one.

Class Size Minimum: 4 Maximum: 12

Learn To Program In C course outline


Session 1:

Why Learn C?

Software Setup and Demo

Your First Program – Hello World!

Statements & Comments:

  1. Termination

  2. Compound statements

  3. Block & single line comments

More about printf():

Data Types & Variables:

  1. Naming

  2. Declaration

Flow Control:

  1. if, else

  2. for

  3. while

  4. do-while

Preprocessor Directives:

  1. #include

  2. #define, #undef

  3. #if, #else, #endif,

  4. #ifdef, #ifndef,

  5. Macros

Session 2:

Operators:

  1. Assignment

  2. Increment / Decrement

  3. Arithmetic

  4. Relational

  5. Logical & Bitwise

  6. Conditional

More on Variables:

  1. Initialization

  2. Scope

Arrays:

  1. Declaring & Initializing Arrays

  2. Multidimensional Arrays

  3. Accessing Arrays


Functions:

  1. Declaration

  2. Arguments & Return parameters

  3. Variable argument list

Flow Control:

  1. Switch

  2. break & continue


Session 3:

The Standard C Library header files

<assert.h> Defines the assert macro used for diagnostic messages

<complex.h> Defines functionality for complex arithmetic

<ctype.h> Declarations for character classification functions.

<errno.h> Defines macros to report error conditions through error codes

<fenv.h> Various functions and macros for manipulating the floating-point environment

<float.h> Contains macros that expand to various limits and parameters of the standard floating-point types

<inttypes.h> Defines a number of macros for use with printf and scanf

<iso646.h> Allows use of bitwise and logical operators that cannot be typed on some keyboards

<limits.h> Definitions of the characteristics of common variable types

<locale.h> Used for purposes of localization

<math.h> Macros and definitions designed for basic mathematical operations

<setjmp.h> Provide "non-local jumps": control flow that differs from the usual subroutine call and return

<signal.h> Specifies how a program handles external or internal signals while it executes

<stdarg.h> Allows functions to accept an indefinite number of arguments.

<stdbool.h> Contains macros for a Boolean data type

<stddef.h> Defines the macros NULL , offsetof and types ptrdiff_t, wchar_t, and size_t.

<stdint.h> Provides a set of typedefs that specify exact-width integer types

<stdio.h> Macros , constants, functions and types used for standard input and output operations

<stdlib.h> Includes functions for memory allocation, process control, conversions and others

<string.h> Macro definitions, constants, functions and types for string and memory handling

<tgmath.h> Macros that can be used for a variety of mathematical operations

<time.h> Declares time and date functions

<wchar.h> Extended multibyte and wide character utilities

<wctype.h> Functions and macros for classifying and mapping wide characters


Pointers:

Structures:

Strings & String Functions:

a. strlen()

b. strcpy(), strncpy()

c. strcat(), strcmp(), strstr()


Simple File I/O:

a. fopen(), fclose(), feof()

b. fgets(), fclose(), fread()



Session 4:

Windows Programming :

  1. The Win32 API

  2. Messages and Message Loops

  3. Dialogs and the Resource Editor

  4. Your first Windows program HelloWin.c

  5. Registering the Window Class

  6. Creating A Window

  7. The Message Loop

  8. The Window Procedure

  9. Standard controls