C Programming - Introduction

Code:

ZD77-702

Series:

Computer Professional

Duration:

5 days

Introduction to C
The C Language and its Advantages
The Structure of a C Program
Writing C Programs
Building an Executable Version of a C Program
Debugging a C Program
Examining and Running a C Application Program

Data Types and Variables
Constants & Variables
printf() Function
Data Format Specifiers
Escape Sequences
Basic Data Types of the C Language
Integer & Character Data
Floating-Point Data
Data Storage & Value Ranges
The sizeof Operator
Data Declaration & Assignment
The typedef Keyword
Operands, Operators, and Arithmetic Expressions
Rules of Precedence
Casting
Bitwise Operators


Input/Output Management
The Input/Output Concept
Input/Outout Libraries
Header Files
stdio.h
Buffered vs. Unbuffered I/O

The getchar() and putchar() Functions and Single-character I/O
Formatted Input and the scanf() Function

Control-Flow Statements
The Control-Flow Program Statements
Logical & Relational Operators
True/False Representation
The if..else Construct
The ? Ternary Operator
Jump Statements - break, continue, goto

The switch Statement
Looping Statements
Types of Loops - for, while, do...while
Symbolic Constants

The Data-checking process

Modular Programming with Functions
The C Function
Function Prototypes
Function Calls
Local Variables within Functions
Returning a Value from a Function

Passing Data to Functions
Passing an Address to Modify a Value in Memory
Using Pointers & the Indirection Operator

The ANSI C Standard Library Functions

Arrays, Pointers, and Strings
Arrays
Array Types
Multidimensional Arrays

Pointers
Pointer Arithmetic
Arrays of Pointers

Strings & String Constants
The gets() and puts() Functions

String Operations using the String Library Functions

Structures and Dynamic Memory Allocation
Structures
Creating & Initialising Structures

Arrays of Structures
Passing Structures to Functions
Using Structure Pointers

Nested Structures
Dynamic Memory Allocation
Memory & Variables
The malloc() & free() Functions

The Preprocessor and Multiple-file Compilation
The C Preprocessor and the #include and #define directives
Expansion of Macros

The Conditional Compilation Directives
Global Variables and Variable Storage Classes
Automatic Variables
Eternal Variables
Static Variables

Program Organization and Multi-file Compilation

File Input/Output
Command-line Arguments
argc & argv Command-Line Arguments
Using Command-line String Arguments
Using Numeric Command-line Arguments

File Input and Output
Streams & Files
Text vs. Binary Files
ANSI C Standard File I/O Facilities
Reading from a File
Writing to a File

Combining Command-line Arguments and File I/O

Appendices
The ASCII Table
The Bitwise Operators
A Comparison of the ANSI C and K&R Function Formats
Enumerated Data Types
Unions



C Programming - Introduction

Course specifications
Course number: 077-702
Software version number: ANSI C
Course length: 5 days

Course description

Overview:
Students will learn the fundamentals of the C programming language.
Although problem-solving skills are recognized as an integral component of computer programming, the primary focus of this course is to teach the specific components of the C language. Each lesson and activity focuses on this objective by having students examine and evaluate existing code, and modify or create new code that implements the components they have just learned about.

Prerequisites:
Background in a structured programming language, such as Pascal, is desirable, though not required.


Delivery method:
Instructor-led, group-paced, classroom-delivery learning model with structured hands-on activities.


Benefits:
Students will learn how to read, interpret, modify, and create C programs.


Target student:
Students enrolling in this course should understand the basic concepts involved in writing computer programs.


What's next:
This course is not part of a series. However, C is foundational knowledge for programming languages such as C++ and Java. Students who want to learn more can take course in those advanced languages.


C Programming - Introduction

Performance-based objectives
Lesson objectives help students become comfortable with the course, and also provide a means to evaluate learning. Upon successful completion of this course, students will be able to:
  • Recognize the basic components and structure of a C program.
  • Define variables by using the basic C data types; and use the fundamental C operators and operands in conjunction with variables to create C expressions and statements.
  • Use the functions getchar(), putchar(), printf(), and scanf() to perform formatted input and output.
  • Create control-flow statements with the C branching and looping constructs.
  • Create modular programs by defining functions and by using the library functions and header files.
  • Use arrays and pointers to store and manipulate data; and to use the gets(), puts(), strcmp(), and strcat() string functions to work with character strings.
  • Define and use structures to work with groupings of related data; and use the malloc() and free() functions to allocate program memory.
  • Use the #define and #include preprocessor directives to extend a C program; and use conditional compilation directives, global variables, and storage classes in working with multiple-file programs.
  • Provide input and output (I/O) to a C program from the command-line or from a file with basic file I/O techniques.