Intermediate C Programming

Intermediate C Programming

by Yung-Hsiang Lu

Paperback

$92.95
View All Available Formats & Editions
Choose Expedited Shipping at checkout for guaranteed delivery by Wednesday, March 27

Product Details

ISBN-13: 9781498711630
Publisher: Taylor & Francis
Publication date: 06/24/2015
Pages: 498
Product dimensions: 8.30(w) x 10.20(h) x 0.50(d)

About the Author

Yung-Hsiang Lu is an associate professor in the School of Electrical and Computer Engineering at Purdue University. He is an ACM Distinguished Scientist and ACM Distinguished Speaker. He received a Ph.D. from the Department of Electrical Engineering at Stanford University.

Table of Contents

Computer Storage Memory and File
Program Execution
Compile
Redirecting Output

Stack Memory
Values and Addresses
Stack
The Call Stack
Visibility
Exercises
Answers
Examine the Call Stack with DDD

Prevent, Detect, and Remove Bugs
Developing Software ≠ Coding
Common Mistakes
Post-Execution and Interactive Debugging
Separate Testing Code from Production Code

Pointer
Scope
The Swap Function
Pointers
The Swap Function Revisited
Type Errors
Array and Pointer
Type Rules
Pointer Arithmetics
Exercises
Answers

Writing and Testing Programs
Distinct Array Elements
Test Using Makefile
Invalid Memory Access
Use valgrind to Check Memory Access Errors
Test Coverage
Limit Core Size
Program with Infinite Loops

Strings
Array of Characters
String Functions in C
Understanding argv
Counting Substrings

Programming Problems and Debugging
Implement String Functions
Debugging

Heap Memory
Create Array with malloc
The Stack and the Heap
Function That Return a Heap Address
Two-Dimensional Arrays in C
Pointers and Arguments

Programming Problems
Sorting an Array
Sort Using qsrot

Reading and Writing Files
Passing a File Name via argv
Reading from Files
Writing to Files
Reading and Writing Strings

Programming Problems
Sorting a File of Integers
Counting the Occurrences of Characters
Counting the Occurrences of a Word
How to Comment Code

Recursion
Recursion
Selecting Balls with Restrictions
One-Way Streets
The Tower of Hanoi
Calculating Integer Partitions

Recursive C Functions
Select Balls with Restrictions
One-Way Streets
The Tower of Hanoi
Integer Partition
Factorial
Fibonacci Numbers
Performance Profiling Using gprof

Integer Partition
Stack and Heap Memory
Trace Recursion Function Calls
Generating Partitions with Restrictions

Programming Problems
Binary Search
Quick Sort
Permutations and Combinations
Stack Sort
Tracing a Recursive Function
A Recursive Function with a Mistake

Structure
Programmer-Defined Data Types

Struct and Object
Passing Objects as Arguments
Objects and Pointers
Constructors and Destructors
Structures within Structures
Binary Files and Objects

Programming Problems
Sorting a Person Database
Packing Decimal Digits
Binary File and Pointer

Linked Lists
Expandable Types
Linked Lists
Inserting Data
Searching a Linked List
Deleting from a Linked List
Printing a Linked List
Destroying a Linked List

Programming Problems
Queues
Sorting Numbers
Sparse Arrays
Reversing a Linked List

Binary Search Trees
Binary Search Tree
Inserting Data into a Binary Search Tree
Searching a Binary Search Tree
Printing a Binary Search Tree
Deleting from a Binary Search Tree
Destroying a Binary Search Tree
main
Makefile
Counting the Different Shapes of a Binary Tree

Parallel Programming Using Threads
Parallel Programming
Multi-Tasking
POSIX Thread
Subset Sum
Interleaving the Execution of Threads
Thread Synchronization
Amdahl’s Law

Applications
Finding the Exit of a Maze
Maze File Format
Reading the Maze File
The Maze Structure
An Escape Strategy
Implementing the Strategy

Image Processing
Structure for Image
Processing Images

Huffman Compression
Example
Encoding
Decoding

Appendix A: Linux
Appendix B: Version Control
Appendix C: Integrated Development Environments (IDE)

Index

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews