دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش:
نویسندگان: Jeff Szuhay
سری:
ISBN (شابک) : 1789349915, 9781789349917
ناشر: Packt Publishing
سال نشر: 2020
تعداد صفحات: 624
زبان: English
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 6 مگابایت
در صورت تبدیل فایل کتاب Learn C Programming: A beginner's guide to learning C programming the easy and disciplined way به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب برنامه نویسی C را بیاموزید: راهنمای مبتدیان برای یادگیری برنامه نویسی C به روش آسان و منظم نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
با نوشتن برنامه های ساده به زبان C شروع کنید و در عین حال مهارت هایی را یاد بگیرید که به شما کمک می کند تقریباً با هر زبان برنامه نویسی کار کنید
C یک زبان برنامه نویسی همه منظوره قدرتمند است که یادگیری آن برای مبتدیان بسیار عالی است. . این کتاب شما را با برنامه نویسی کامپیوتر و توسعه نرم افزار با استفاده از C آشنا می کند. اگر یک توسعه دهنده با تجربه هستید، این کتاب به شما کمک می کند تا با زبان برنامه نویسی C آشنا شوید.
این کتاب برنامه نویسی C شما را با مفاهیم پایه برنامه نویسی آشنا می کند و به شما نشان می دهد که چگونه آنها را در C پیاده سازی کنید. در سراسر کتاب، برنامه هایی را ایجاد و اجرا خواهید کرد که از یک یا چند مفهوم C استفاده می کنند، مانند ساختار برنامه با توابع، انواع داده ها و عبارات شرطی. همچنین نحوه استفاده از حلقه و تکرار، آرایه ها، اشاره گرها و رشته ها را خواهید دید. همانطور که پیشرفت می کنید، اسناد کد، روش های آزمایش و اعتبارسنجی، ورودی/خروجی اولیه و نحوه نوشتن برنامه های کامل در C را پوشش خواهید داد.
در پایان کتاب، شما توسعه داده اید. مهارت های اولیه برنامه نویسی در C، که می توانید آن را برای سایر زبان های برنامه نویسی اعمال کنید و پایه محکمی برای پیشرفت شما به عنوان یک برنامه نویس ایجاد می کند.
این کتاب برای دو مخاطب بسیار متفاوت نوشته شده است. .
اگر شما یک مبتدی مطلق هستید که فقط با کار با کامپیوتر آشنایی اولیه دارید، این کتاب به شما کمک می کند اساسی ترین مفاهیم و شیوه هایی را که برای تبدیل شدن به یک برنامه نویس C موفق باید بدانید را بیاموزید.
اگر یک برنامه نویس با تجربه هستید، طیف کاملی از نحو C و همچنین اصطلاحات رایج C را خواهید یافت. میتوانید توضیحات را مرور کنید و اساساً روی کد منبع ارائه شده تمرکز کنید.
Get started with writing simple programs in C while learning the skills that will help you work with practically any programming language
C is a powerful general-purpose programming language that is excellent for beginners to learn. This book will introduce you to computer programming and software development using C. If you're an experienced developer, this book will help you to become familiar with the C programming language.
This C programming book takes you through basic programming concepts and shows you how to implement them in C. Throughout the book, you'll create and run programs that make use of one or more C concepts, such as program structure with functions, data types, and conditional statements. You'll also see how to use looping and iteration, arrays, pointers, and strings. As you make progress, you'll cover code documentation, testing and validation methods, basic input/output, and how to write complete programs in C.
By the end of the book, you'll have developed basic programming skills in C, that you can apply to other programming languages and will develop a solid foundation for you to advance as a programmer.
This book is written for two very diverse audiences.
If you're an absolute beginner who only has basic familiarity with operating a computer, this book will help you learn the most fundamental concepts and practices you need to know to become a successful C programmer.
If you're an experienced programmer, you'll find the full range of C syntax as well as common C idioms. You can skim through the explanations and focus primarily on the source code provided.
Cover Title Page Copyright and Credits Dedication About Packt Contributors Table of Contents Preface Section 1: C Fundamentals Chapter 1: Running Hello, World! Technical requirements Writing your first C program Hello, world! Understanding the program development cycle Edit Compile Many C compilers for every OS A note about IDEs Installing a compiler on Linux, macOS, or Windows Run Verify Repeat A note about debugging Creating, typing, and saving your first C program Compiling your first C program Running your first C program Writing comments to clarify the program later Some guidelines on commenting code Adding comments to the Hello, world! program Learning to experiment with code Summary Chapter 2: Understanding Program Structure Technical requirements Introducing statements and blocks Experimenting with statements and blocks Understanding delimiters Understanding whitespace Introducing statements Introducing functions Understanding function definitions Exploring function identifiers Exploring the function block Exploring function return values Passing in values with function parameters Order of execution Understanding function declarations Summary Chapter 3: Working with Basic Data Types Technical requirements Understanding data types Bytes and chunks of data Representing whole numbers Representing positive and negative whole numbers Specifying different sizes of integers Representing numbers with decimals Representing single characters Representing Boolean true/false Understanding the sizes of data types The sizeof() operator Ranges of values Summary Chapter 4: Using Variables and Assignment Technical requirements Understanding types and values Introducing variables Naming variables Introducing explicit types of variables Using explicit typing with initialization Exploring constants Literal constants Defined values Explicitly typed constants Naming constant variables Using types and assignment Using explicit assignment, the simplest statement Assigning values by passing function parameters Assignment by the function return value Summary Chapter 5: Exploring Operators and Expressions Technical requirements Expressions and operations Introducing operations on numbers Considering the special issues resulting from operations on numbers Understanding NaN Understanding underflow NaN Understanding overflow NaN Considering precision Exploring type conversion Understanding implicit type conversion and values Using explicit type conversion – casting Introducing operations on characters Exploring logical and relational operators Bitwise operators The conditional operator The sequence operator Compound assignment operators Multiple assignments in a single expression Incremental operators Postfix versus prefix incrementation Order of operations and grouping Summary Chapter 6: Exploring Conditional Program Flow Technical requirements Understanding conditional expressions Introducing the if()… else… complex statement Using a switch()… complex statement Introducing multiple if()… statements Using nested if()… else… statements The dangling else… problem Summary Chapter 7: Exploring Loops and Iteration Technical requirements Understanding repetition Understanding brute-force repetition Introducing the while()… statement Introducing the for()… statement Introducing the do … while() statement Understanding loop equivalency Understanding unconditional branching – the dos and (mostly) don\'ts of goto Further controlling loops with break and continue Understanding infinite loops Summary Chapter 8: Creating and Using Enumerations Technical requirements Introducing enumerations Defining enumerations Using enumerations The switch()… statement revisited Summary Section 2: Complex Data Types Chapter 9: Creating and Using Structures Technical requirements Understanding structures Declaring structures Initializing structures and accessing structure elements Performing operations on structures – functions Structures of structures Initializing structures with functions Printing a structure of structures – reusing functions The stepping stone to object-oriented programming Summary Chapter 10: Creating Custom Data Types with typedef Technical requirements Renaming intrinsic types with typedef Using synonyms Simplifying the use of enum types with typedef Simplifying the use of struct types with typedef Other uses of typedef Some more useful compiler options Using a header file for custom types and the typedef specifiers Summary Chapter 11: Working with Arrays Technical requirements Declaring and initializing arrays Initializing arrays Accessing array elements Assigning values to array elements Operating on arrays with loops Using functions that operate on arrays Summary Chapter 12: Working with Multi-Dimensional Arrays Technical requirements Going beyond one-dimensional arrays to multi-dimensional arrays Revisiting one-dimensional arrays Moving on to two-dimensional arrays Moving on to three-dimensional arrays Considering N-dimensional arrays Declaring and initializing multi-dimensional arrays Declaring arrays of two dimensions Initializing arrays of two dimensions Declaring arrays of three dimensions Initializing arrays of three dimensions Declaring and initializing arrays of N dimensions Accessing elements of multi-dimensional arrays Manipulating multi-dimensional arrays – loops within loops Using nested loops to traverse a two-dimensional array Using nested loops to traverse a three-dimensional array Using multi-dimensional arrays in functions Summary Chapter 13: Using Pointers Technical requirements Addressing pointers – the boogeyman of C programming Why use pointers at all? Introducing pointers Understanding direct addressing and indirect addressing Understanding memory and memory addressing Managing and accessing memory Exploring some analogies in the real world Declaring the pointer type, naming pointers, and assigning addresses Declaring the pointer type Naming pointers Assigning pointer values (addresses) Operations with pointers Assigning pointer values Differentiating between the NULL pointer and void* Understanding the void* type Accessing pointer targets Pointer arithmetic Comparing pointers Verbalizing pointer operations Variable function arguments Passing values by reference Passing addresses to functions without pointer variables Pointers to pointers Using pointers to structures Accessing structures and their elements via pointers Using pointers to structures in functions Summary Chapter 14: Understanding Arrays and Pointers Technical requirements Understanding array names and pointers Understanding array elements and pointers Accessing array elements via pointers Operations on arrays using pointers Using pointer arithmetic Using the increment operator Passing arrays as function pointers revisited Interchangeability of array names and pointers Introducing an array of pointers to arrays Summary Chapter 15: Working with Strings Technical requirements Characters – the building blocks of strings The char type and ASCII Beyond ASCII – UTF-8 and Unicode Operations on characters Getting information about characters Manipulating characters Exploring C strings An array with a terminator Strengths of C strings Weaknesses of C strings Declaring and initializing a string String declarations Initializing strings Passing a string to a function Empty strings versus null strings Hello, World! revisited Creating and using an array of strings Common operations on strings – the standard library Common functions Safer string operations Summary Chapter 16: Creating and Using More Complex Structures Technical requirements Introducing the need for complex structures Revisiting card4.h Understanding an array of structures Creating an array of structures Accessing structure elements within an array Manipulating an array of structures Using a structure with other structures Creating a structure consisting of other structures Accessing structure elements within the structure Manipulating a structure consisting of other structures Using a structure with arrays Understanding randomness and random number generators Creating a structure with an array Accessing array elements within a structure Manipulating array elements within a structure Revisiting the hand structure Revisiting hand operations Using a structure with an array of structures Creating a structure with an array of structures Accessing individual structure elements of the array within a structure Manipulating a structure with an array of structures Completing carddeck.c Revisiting the deck structure Revisiting deck operations A basic card program Summary Section 3: Memory Manipulation Chapter 17: Understanding Memory Allocation and Lifetime Technical requirements Defining storage classes Understanding automatic versus dynamic storage classes Automatic storage Dynamic storage Understanding internal versus external storage classes Internal or local storage classes External or global storage classes The lifetime of automatic storage Exploring the static storage class Internal static storage External static storage The lifetime of static storage Summary Chapter 18: Using Dynamic Memory Allocation Technical requirements Introducing dynamic memory A brief tour of C\'s memory layout Allocating and releasing dynamic memory Allocating dynamic memory Releasing dynamic memory Accessing dynamic memory The lifetime of dynamic memory Special considerations for dynamic allocation Heap memory management Memory leaks The linked list dynamic data structure Linked list structures Declaring operations on a linked list Pointers to functions More complex operations on a linked list A program to test our linked list structure Other dynamic data structures Summary Section 4: Input and Output Chapter 19: Exploring Formatted Output Technical requirements Revisiting printf() Understanding the general format specifier form Using format specifiers for unsigned integers Using unsigned integers in different bases Considering negative numbers as unsigned integers Exploring powers of 2 and 9 in different bases Printing pointer values Using format specifiers for signed integers Using the signed integer field width, precision, alignment, and zero-filling Formatting long-long integers Powers of 2 and 9 with different modifiers Using format specifiers for floats and doubles Using the floating-point field width, precision, alignment, and zero-filling Printing doubles in hexadecimal format Printing optimal field widths for doubles Using format specifiers for strings and characters Using the string field width, precision, alignment, and zero-filling Exploring the sub-string output Using single character formatting Summary Chapter 20: Getting Input from the Command Line Technical requirements Revisiting the main() function The special features of main() The two forms of main() Using argc and argv A simple use of argc and argv Command-line switches and command-line processors Summary Chapter 21: Exploring Formatted Input Technical requirements Introducing streams Understanding the standard output stream Understanding the standard input stream Revisiting the console output with printf() and fprintf() Exploring the console input with scanf() Reading formatted input with scanf() Reading numerical input with scanf() Reading string and character input with scanf() Using a scan set to limit possible input characters Controlling the scanf() input field width Using internal data conversion Using sscanf() and sprintf() to convert values into and from strings Converting strings into numbers with atoi() and atod() Exploring unformatted input and output Getting the string input and output to/from the console Using the simple input and output of strings with gets() and puts() Understanding why using gets() could be dangerous Creating a sorted list of names with fgets() and fputs() Summary Chapter 22: Working with Files Technical requirements Understanding basic file concepts Revisiting file streams Understanding the properties of the FILE streams Opening and closing a file Understanding file operations for each type of stream Introducing the filesystem essentials Introducing the filesystem Understanding a file path Understanding a filename Opening files for reading and writing Getting filenames from within the program Getting filenames from the command line Summary Chapter 23: Using File Input and File Output Technical requirements File processing Creating a template program to process filenames given on the command line Creating a file of unsorted names Trimming the input string from fgets() Reading names and writing names Reading unsorted names and sorting them for output Using a linked list to sort names Writing names in sorted order Summary Section 5: Building Blocks for Larger Programs Chapter 24: Working with Multi-File Programs Technical requirements Understanding multi-file programs Using header files for declarations and source files for definitions Creating source files Creating header files Revisiting the preprocessor Understanding the limits and dangers of the preprocessor Knowing some dangers of the preprocessor Using the preprocessor effectively Debugging with the preprocessor Creating a multi-file program Extracting Card structures and functions Extracting Hand structures and functions Extracting Deck structures and functions Finishing the dealer.c program Building a multi-file program Summary Chapter 25: Understanding Scope Technical requirements Defining scope – visibility, extent, and linkage Exploring visibility Exploring extent Exploring linkage Understanding compilation units Putting visibility, extent, and linkage all together Exploring variable scope Understanding the block scope of variables Understanding function parameter scope Understanding file scope Understanding global scope Understanding function scope Understanding scope and information hiding Using the static specifier for functions Summary Epilog Taking the next steps More advanced C topics More advanced programming topics Picking a project for yourself Resources Appendix C definition and keywords C keywords Table of operators and their precedence Summary of useful GCC and Clang compiler options ASCII character set The Better String Library (Bstrlib) A quick introduction to Bstrlib A few simple examples Unicode and UTF-8 A brief history Where we are today Moving from ASCII to UTF-8 A UTF-to-Unicode example The C standard library Method 1 Method 2 Method 3 Other Books You May Enjoy Index