ISBN-13: 9783030507527 / Angielski / Miękka / 2021 / 204 str.
ISBN-13: 9783030507527 / Angielski / Miękka / 2021 / 204 str.
Chapter 1: Installing and Using Code::Blocks; creating a source file, compiling and executing it
1.1 Downloading and installing Code::Blocks
1.2 Compiling and executing your first C program
1.3 Writing your first program
Chapter 2: Variables, memory and operators
1.1 Variables – a brief Introduction
1.2 Declaring simple variables
1.2.1 Declaring and initializing integer variables1.2.2 Setting values of variables
1.2.2.1 Integer variables
1.2.2.2 Floating point variables
1.2.2.3 Double Precision floating point variables
1.2.2.4 Character variables 1.2.3 Mixing up data types1.3 Working with variables and operators
1.3.1 Addition, subtraction and multiplication
1.3.2 Division
1.3.2.1 Integer division 1.3.2.2 Mixing up integer and floating point division1.3.3 Increment/decrement operators
1.4 Constants
1.5 Summary
Chapter 3: Selection Structures
3.1 Selection Structures – a short intro
3.2 Single-selection structures
3.3 Double-selection structures
3.4 Multiple-selection structures
3.5 Exercise for the student
3.6 The switch structure
3.7 Summary
Chapter 4: Repetition Structures
4.1 Repetition Structures – a short intro
4.2 for Loops
4.3 The while loop
4.4 The do-while loop
4.5 Summary
Chapter 5: Defining and Calling Programmer-defined Functions
5.1 Defining and calling functions – a short intro
5.2 Defining functions
5.3 Calling functions5.4 Returning values
5.5 Passing values of variables to functions
5.6 Summary
Chapter 6: Pointer variables
6.1 Pointers – a short intro
6.2 Declaring and initializing pointers
6.3 Input/output with pointers
6.4 Calling functions by reference with pointers
6.5 Pointer arithmetic
6.6 Double pointers
6.7 Summary
Chapter 7: Arrays
7.1 Arrays – a short intro
7.2 Declaring and initializing arrays7.3 Arrays, pointers and pointer math
7.4 Arrays and loops
7.5 Passing arrays to functions
7.6 SummaryChapter 8: Structures
8.1 structures – a short intro8.2 Instantiating structure variables
8.2.1 Instantiating within the body of the struct definition
8.2.2 Instantiating structure variables using the structure tag
8.2.3 Defining new data types with typedef
8.3 Member access operators: the Dot and the Arrow operators
8.4 Passing structures to functions8.5 Structures, arrays and loops
8.6 Summary
Chapter 9: Strings, Advanced I/O
9.1 Strings – a deeper treatment
9.1.1 Initializing strings
9.1.2 Setting values to string variables
9.1.3 The length of a string
9.1.4 Comparing strings
9.1.5 Concatenating strings9.2 Advanced I/O
9.2.1 The width specifier
9.2.2 The .precision specifier
9.2.3 The flag specifier
9.3 External file I/O
9.3.1 Writing to external files
9.3.2 Reading from external files
9.4 Summary
Chapter 10: Dynamic Memory Allocation, Multi-file programs
10.1Dynamic Memory Allocation10.2How to allocate memory dynamically
10.3Multi-file programs10.4Summary
Chapter 11: Linked Lists
11.1Linked structures – a brief introduction
11.2How to link together dynamically-allocated memory
11.3Traversing a linked list
11.4Inserting nodes into an existing linked list
11.4.1 Inserting new nodes at the front of the linked list
11.4.2 Inserting new nodes at the tail of the linked list11.5Deleting nodes from the list
11.6Summary
Chapter 12: Searching and Sorting
12.1 Searching
12.2 Sorting a List
12.2.1 Selection Sort
12.2.2 Bubble Sort
12.3 Summary
Avelino Gonzalez is Professor Emeritus in the Computer Science Department at the University of Central Florida. He was previously a Professor in the same department, and had a joint appointment with the ECE department. Prior to that he was a Senior Engineer with the Westinghouse Electric Corporation, where he was instrumental in the development of the GenAID system, the first commercially available AI product. He received his BS and MS degrees in Electrical Engineering from the University of Miami, and his PhD in Electrical Engineering from the University of Pittsburgh. His area of research is Artificial Intelligence, the role of context in modeling intelligent behavior, and machine learning from observation of human actions. He has co-authored nearly 300 research articles, as well as three text books and one edited volume (in contextual reasoning). He is a Fellow of the IEEE.
This textbook is an ideal introduction in college courses or self-study for learning computer programming using the C language. Written for those with minimal or no programming experience, Computer Programming in C for Beginners offers a heavily guided, hands-on approach that enables the reader to quickly start programming, and then progresses to cover the major concepts of C programming that are critical for an early stage programmer to know and understand. While the progression of topics is conventional, their treatment is innovative and designed for rapid understanding of the many concepts in C that have traditionally proven difficult for beginners, such as variable typing and scope, function definition, passing by value, pointers, passing by reference, arrays, structures, basic memory management, dynamic memory allocation, and linked lists, as well as an introductory treatment of searching and sorting algorithms.
Written in an informal but clear narrative, the book uses extensive examples throughout and provides detailed guidance on how to write the C code to achieve the objectives of the example problems. Derived from the author’s many years of teaching hands-on college courses, it encourages the reader to follow along by programming the progressively more complex exercise programs presented. In some sections, errors are purposely inserted into the code to teach the reader about the common pitfalls of programming in general, and the C language in particular.
1997-2024 DolnySlask.com Agencja Internetowa