This course illustrates the basic elements of programming in the C Language. The course uses interactive programming exercises to teach the components of a C program and the syntax of basic C commands. The course begins with an overview of C and its history, comparing it with other programming languages. The structures and elements that every program must contain are introduced, then keywords and identifiers are covered along with the printf( ) function. The use of white space, indents, and comments to document C programs are also covered. The interactive constructs, conditional constructs, execution control statements, break, and continue are explained, demonstrated, and practiced. Data types used in C programs, arithmetic operators, logical operators, and abbreviation of C statements using cryptic constructs are also introduced. This course is not written to a specific version.
Unit 1: Getting Started in C
- History and Overview
- Anatomy of a C Program
- Write C Statements
- Format Program Output
- Using Numeric Variable Data
- Documenting and Formatting a C Program
Unit 2: Loops
- Structured Programming
- While Loops
- Do-while Loops
- For Loops
Unit 3: Branches and Switches
- Conditional Branching
- Break and Continue
- Switch Construct
Unit 4: Program Variables
- Variables
- Assigning Variables
- Character and Floating Point Variables
- Additional Data Types
- Formatting Output
- Manipulating Output
Unit 5: Comparing Variables
- Comparing Program Variables
- Combined Conditional Expressions