C

Методы программирования в задачах и примерах на C/C++ - А. А. Корнев, В. Д. Валединский

2023
C
русский

 Учебное пособие является обобщением опыта преподавания университетского курса «Работа на ЭВМ и программирование» для студентов механикоматематического факультета МГУ имени М. В. Ломоносова и школьного курса «Информатика» в классах при механико-математическом факультете на базе 54-й школы г. Москвы и в математических классах Университетской гимназии. В книге собраны и систематизированы задачи, предлагавшиеся для самостоятельного решения во время семинарских занятий, лабораторных работ, на зачетах и экзаменах.

 Книга предназначена учащимся старших классов с углубленным изучением математики и информатики, студентам высших учебных заведений, осваивающим методы программирования и язык C, а также в помощь преподавателям для проведения практических занятий.

Перейти >

Beginning C++ Compilers - Ademi B. Ospanova, Berik I. Tuleuov

2024
C
english

 This book focuses on how to install C/C++ compilers on Linux and Windows platforms in a timely and efficient way. Installing C/C++ compilers, especially Microsoft compilers, typically takes quite a lot of time because it comes with Microsoft Visual Studio for the vast majority of users. Installing Visual Studio requires usually about 40 GB of disk space and a large amount of RAM, so it is impossible to use weak hardware.

 The authors provide an easy way to deploy Microsoft C/C++ compiler: with no disk space headache and hardware resources lack. The method described saves significant time since software can even be deployed on removable devices, such as flash sticks, in an easy and portable way.

 It is achieved by using Enterprise Windows Driver Kit (EWDK), single big ISO image, which can be mounted as virtual device and used directly without any installation. EWDK contains everything from Visual Studio except IDE. EWDK also allows to use MASM64 (Microsoft Macro-Assembly) and C# compilers.

 With the aid of the MSBuild System, one can compile Visual Studio Projects (.vcxproj) and Solutions (.sln) without even using Visual Studio! Similarly, MinGW compilers can be deployed from 7z/zip archives, simply by unpacking into appropriate location. Both Microsoft C/C++ and MinGW compilers can be used as portable software—an approach that does not require administrative privileges at all.

What you’ll learn

  • Rapid installation of modern Microsoft C/C++ and MinGW compilers.
  • How to prepare reusable and portable Microsoft C/C++ and MinGW compilers suite on removable media (flash stick, CD/DVD).
  • How to use Microsoft C/C++ and MinGW compilers even on old/slow computers without standard installation.
  • How to build under Windows the libraries originally designed for Unix-systems.
  • Learn to run multiple versions of these compilers at the same time.

Who This Book Is For

Reader of all skills who wants to save time and efforts to start to work with C++. Also useful for scientists who are not familiar with software installation.

Перейти >

Memory Thinking for C and C++ Windows Diagnostics - Dmitry Vostokov

2023
C
english

Solid C and C++ knowledge is a must to fully understand Windows diagnostic artifacts such as memory dumps and do diagnostic, forensic, and root cause analysis beyond listing stack traces, DLL, and driver information. This full-color reference book is a part of the Accelerated C & C++ for Windows Diagnostics training course organized by Software Diagnostics Services. The text contains slides, brief notes highlighting particular points, and replicated source code fragments that are easy to copy into your favorite IDE. The book's detailed Table of Contents makes the usual Index redundant.

We hope this reference is helpful for the following audiences:

  • C and C++ developers who want to deepen their knowledge
  • Software engineers developing and maintaining products on Windows platforms
  • Technical support, escalation, DevSecOps, cloud and site reliability engineers dealing with complex software issues
  • Quality assurance engineers who test software on Windows platforms
  • Security and vulnerability researchers, reverse engineers, malware and memory forensics analysts
Перейти >

Learn Programming with C - Md Atiqur Rahman Ahad, Sazzad M.S. Imran

2024
C
english

 Authored by two standout professors in the field of Computer Science and Technology with extensive experience in instructing, Learn Programming with C: An Easy Step-by Step Self-Practice Book for Learning C is a comprehensive and accessible guide to programming with one of the most popular languages.

 Meticulously illustrated with figures and examples, this book is a comprehensive guide to writing, editing, and executing C programs on different operating systems and platforms, as well as how to embed C programs into other applications and how to create one’s own library. A variety of questions and exercises are included in each chapter to test the readers’ knowledge.

 Written for the novice C programmer, especially undergraduate and graduate students, this book’s line-by-line explanation of code and succinct writing style makes it an excellent companion for classroom teaching, learning, and programming labs.

Перейти >

Основы программирования на языке С - В. Г. Дорогов, Е. Г. Дорогова

2020
C
русский

 

 Учебное пособие является начальным курсом программирования с примерами на языке С. Рассмотрены основы программирования, приемы и методы в стиле классического С. Может быть использовано как руководство по языку. Приводятся многочисленные примеры, оттестированные на компьютере.
 Соответствует требованиям федеральных государственных образовательных стандартов среднего профессионального образования последнего поколения.
 Рекомендовано студентам, изучающим дисциплины "Основы программирования", "Языки высокого уровня", "Информатика".

Перейти >

Язык Си - Денис Васильевич Парфенов

2023
C
русский

 В учебном пособии представлена новейшая версия языка программирования Си, ставшего международным стандартом. Совмещены подходы учебного пособия и справочника, что облегчает студентам изучение материала. Особое внимание уделено стилю программирования, его эффективности и выразительности. Для студентов технических вузов, обучающихся по направлениям подготовки 01.03.02 "Прикладная математика и информатика" и 02.03.02 "Фундаментальная информатика и информационные технологии".

Перейти >

Язык С. Мастерство программирования - Кристофер Прешерн

2023
C
русский

 Авторитетные рекомендации по программированию на C найти трудно. Для объектно-ориентированных языков в них нет недостатка, но для C их на удивление мало. В этой книге начинающие и опытные программисты на C найдут наставления по принятию проектных решений, включая пошаговое применение паттернов к сквозным примерам. Кристофер Прешерн, один из ведущих членов сообщества паттернов проектирования, рассказывает, как организовать программу на C, как обрабатывать ошибки и проектировать гибкие интерфейсы. Ищете ли вы конкретный паттерн или вам нужен обзор проектных решений, относящихся к определенной теме, эта книга будет в помощь. В части I вы научитесь реализовывать проверенные практикой подходы к программированию на языке C; часть II покажет, как паттерны программирования на C применяются к реализации более крупных программ.

Перейти >

C and Python Applications - Philip Joyce

2022
C
english

 Solve problems by embedding Python code in a C programs, SQL methods, Python sockets. This book uses rudimentary mathematics and basic programming to create practical Python applications for embedding. You'll start with an introduction to C and Python, assuming a fundamental understanding of what programming is. You will also review the basics of the database management language, SQL. You will learn how to use SQL from a C program and from a Python program. C and Python have different programming strengths, and you will learn how to write a Python program embedded within a C program to profit from the strength of each, in one program. Finally, you will explore how socket programs enable two computers to communicate with each other. Here the book covers basic server-client, basic threaded, and basic chat programs.

You will:

  • Review basic Python and C coding
  • Understand the methods of embedding Python code within a C program
  • Create typical programs in Python and C using SDK
  • Work with socket applications in Python
Перейти >

C Programming For Dummies. 2 Ed - Dan Gookin

2021
C
english

 As with any major language, mastery of C can take you to some very interesting new places. Almost 50 years after it first appeared, it's still the world's most popular programming language and is used as the basis of global industry's core systems, including operating systems, high-performance graphics applications, and microcontrollers. This means that fluent C users are in big demand at the sharp end in cutting-edge industries―such as gaming, app development, telecommunications, engineering, and even animation―to translate innovative ideas into a smoothly functioning reality.

 To help you get to where you want to go with C, this 2nd edition of C Programming For Dummies covers everything you need to begin writing programs, guiding you logically through the development cycle: from initial design and testing to deployment and live iteration. By the end you'll be au fait with the do's and don'ts of good clean writing and easily able to produce the basic―and not-so-basic―building blocks of an elegant and efficient source code.

  • Write and compile source code
  • Link code to create the executable program
  • Debug and optimize your code
  • Avoid common mistakes

 Whatever your destination: tech industry, start-up, or just developing for pleasure at home, this easy-to-follow, informative, and entertaining guide to the C programming language is the fastest and friendliest way to get there!

Перейти >

Introduction to C & GUI Programming - Simon Long

2019
C
english

 The popular C programming language is used for a huge range of applications, from the tiny microcontrollers used in toasters and watches up to complete operating systems. The first half of this book is an introduction to C, and covers the basics of writing simple command-line programs. The second half of the book shows how to use the GTK user interface toolkit with C to create feature-rich GUI applications which can be run on the desktop. No previous experience of C or GTK is required even if you are an absolute beginner, this book will teach you all you need to know to... l Create simple command-line C programs l Control flow with conditions and loops l Handle variables, strings, and files l Design graphical user interface applications in C l Handle user input with buttons and menus l Use advanced UI features such as data stores and dialogs Raspberry Pi Press is the publishing imprint of Raspberry Pi Trading Ltd., a subsidiary of The Raspberry Pi Foundation. Buying Raspberry Pi Press books and magazines directly helps the Foundation s charitable mission to put the power of computing and digital making in the hands of people all over the world.

Перейти >

Modern C - Jens Gustedt

2020
C
english

 The C programming language has been around for a long time — the canonical reference for it is the book written by its creators, Kernighan and Ritchie [1978]. Since then, C has been used in an incredible number of applications. Programs and systems written in C are all around us: in personal computers, phones, cameras, set-top boxes, refrigerators, cars, mainframes, satellites ... basically in any modern device that has a programmable interface.

 In contrast to the ubiquitous presence of C programs and systems, good knowledge of and about C is much more scarce. Even experienced C programmers often appear to be stuck in some degree of self-inflicted ignorance about the modern evolution of the C language. A likely reason for this is that C is seen as an "easy to learn" language, allowing a programmer with little experience to quickly write or copy snippets of code that at least appear to do what it’s supposed to. In a way, C fails to motivate its users to climb to higher levels of knowledge.

 This book is intended to change that general attitude, so it is organized in levels that reflect familiarity with the C language and programming in general. This structure may go against some habits of the book’s readers; in particular, it splits some difficult subjects (such as pointers) across levels in order to not swamp readers too early with the wrong information. We’ll explain the book’s organization in more detail shortly.

 Generally, although many universally applicable ideas will be presented, that would also be valid for other programming languages (such as Java, Python, Ruby, C#, or C++) the book primarily addresses concepts and practices that are unique to C or are of particular value when programming in the C language.

Перейти >

Pointers in C Programming - Thomas Mailund

2021
C
english

 Pointers and memory management are considered among the most challenging issues to deal with in low-level programming languages such as C. It is not that pointers are conceptually difficult to understand, nor is it difficult to comprehend how we can obtain memory from the operating system and how we return the memory again so it can be reused. The difficulty stems from the flexibility with which pointers let us manipulate the entire state of a running program. With pointers, every object anywhere in a program’s memory is available to us—at least in principle. We can change any bit to our heart’s desire. No data are safe from our pointers, not even the program that we run—a running program is nothing but data in the computer’s memory, and in theory, we can modify our own code as we run it.

 With such a power tool, it should hardly surprise that mistakes can be fatal for a program, and unfortunately, mistakes are easy to make when it comes to pointers. While pointers do have type information, type safety is minimal when you use them. If you point somewhere in memory and pronounce that you want “that integer over there,” you get an integer, no matter what the object “over there” really is. Treat it like an integer, and it behaves like an integer. Assign a value to it, and may the gods have mercy on your soul if it was supposed to be something else and something you need later. You have just destroyed the real object you pointed at.

 If you are not careful, any small mistake can crash your program—or worse. If you accidentally modify the incorrect data in your program, all your output is tainted. If you are lucky, it is easily detectable, and you are in for a fun few days of debugging. If you are less fortunate, you can make business decisions based on incorrect output for years to come, never realizing that the code you wrote is fooling you every time it runs—or maybe not every time, just on infrequent occasions, so rare that you can never chase down the problem. When you have bugs caused by pointers (or uninitialized memory), they are not always reproducible. Your program’s behavior might depend on which other programs are running concurrently on the computer. If you start debugging it, any code you add to the program to examine it will affect its behavior. Loading the program into a debugger will definitely change the behavior as well. I hope that you will never run into such bugs—known as Heisenbugs after Heisenberg’s uncertainty principle—but if you mess around with pointers long enough, you likely will.

Перейти >

Откройте для себя язык C - Робин Джонс, Ян Стюарт

2017
C
русский

 Язык программирования Си занял необычное промежуточное место между “ассемблером” и высокоуровневыми языками, вобрав одновременно преимущества обеих сторон. Эта книга предназначена как для начала освоения языка, так и для приобретения мышления, которое бы существенно упрощало работу с ним. Вероятно, желающие изучить Си уже имели опыт работы с высокоуровневыми языками наподобие Бейсика или Паскаля, и потому постараемся учесть этот опыт и извлечь из него пользу. Так что предполагаем, что обозначения в коде программы простейших арифметических действий будут читателю знакомы и понятны, а также — что читатель знаком с такими понятиями, как циклы и ветвления (операторы условия), которые используются в большинстве языков высокого уровня.

 Но конечно, этого будет мало. Если вы желаете заговорить на иностранном языке, то даже самый лучший перевод по словарю полноценно вам не поможет, поскольку сам целевой язык построен иначе, чем ваш родной. Подобно этому, пусть даже имея на руках некий “словарь” языка Си, нельзя начать программировать на Си с мышлением, по привычке оставшимся от Бейсика. Однако, если изучаемый язык и ваш родной относятся к одному языковому древу, то опора на такое родство станет, особенно поначалу, существенным подспорьем; оттолкнувшись от того, что знакомо, вы обретёте решимость и опыт, необходимые для постижения тех сторон изучаемого языка, которые уже не имеют с вашим родным ничего общего.

 Наш подход к изучению Си будет подобен вышеописанному. Мы не будем бросаться сразу изучать все-все возможности Си, пусть даже это позволило бы нам сразу писать краткий и изящный код. Как правило, краткую запись кода труднее читать, и она может сильно смутить новичка. Полноценное использование таких возможностей языка начнётся тогда, когда читатель освоится и будет к этому готов.

 Наша книга условно состоит из двух частей. Главы с 1-й по 13-ю повествуют об основных возможностях языка — с примерами кода, задачами, а также (где это уместно) более обширными заданиями, призванными проверить качество понимания прочитанного. В главах с 14-й по 17-ю, на основе предыдущего содержания, рассказано о разработке самых настоящих приложений1 . В конце концов, компьютерные программы призваны упрощать жизнь человека, а Си по праву рождения — язык системного программирования. (В частности, он был разработан для написания операционной системы “UNIX”. Так что этот язык прекрасно подходит для разработки прикладных программ.) И задачи, выбранные нами, требуют создания таких программ: это арифметика с рациональными числами2 , так называемая черепашья графика3 , и выдача случайных чисел.

Перейти >

Язык C. Самое необходимое - Николай Анатольевич Прохоренок

2020
C
русский

 Описан базовый синтаксис современного языка С: типы данных, операторы, условия, циклы, работа с числами, строками, массивами и указателями, создание пользовательских функций, модулей, статических и динамических библиотек. Рассмотрены основные функции стандартной библиотеки языка С, а также функции, применяемые только в операционной системе Windows. Для написания, компиляции и запуска программ используется редактор Eclipse, а для создания исполняемого файла - компилятор gcc.exe версии 8.2, входящий в состав популярной библиотеки MinGW-W64. Книга содержит большое количество практических примеров, помогающих начать программировать на языке С самостоятельно. Весь материал тщательно подобран, хорошо структурирован и компактно изложен, что позволяет использовать книгу как удобный справочник. Электронный архив с примерами находится на сайте издательства.

Перейти >

C/C++ в задачах и примерах. 3 изд - Культин Н.Б.

2019
C
русский

 Сборник примеров и задач для самостоятельного решения по программированию на языке C или C++ охватывает практически все разделы начального курса программирования: от задач консольного ввода/вывода, использования циклов и операций с массивами до работы со строками, файлами и объектами. Примеры представлены в виде хорошо документированных исходных текстов программ. Книга содержит справочник — описание основных типов данных, операторов и наиболее часто используемых функций. Адресована студентам, школьникам старших классов и всем тем, кто изучает программирование в учебном заведении или самостоятельно. В третьем издании добавлены и обновлены примеры.

Перейти >

Extreme C - Keyvan Amini

2019
C
english

 This book is written for an audience that has a minimum level of knowledge regarding C and C++ development. Junior and intermediate C/C++ engineers are the main audience that can get the most from this book and leverage their expertise and knowledge. Hopefully, after reading this book, they can gain a raise in their position and become senior engineers. In addition, after reading this book, their expertise would be a better match for more relevant job opportunities that are challenging and usually well paid. Some topics can still be useful to senior C/C++ engineers, but it is expected that most of the topics are known to them and only some extra details can still be useful.

 The other audience that can benefit from reading this book is students and researchers. Students of bachelor's, master's, or PhD degrees studying in any branch of science or engineering such as computer science, software engineering, artificial intelligence, Internet of Things (IoT), astronomy, particle physics, and cosmology, as well as all researchers in these fields, can use the book to increase the level of their knowledge about C and C++, Unix-like operating systems, and the relevant programming skills. This book would be good for engineers and scientists working on complex, multithreaded, or even multi-process systems performing remote device controlling, simulations, big data processing, machine learning, deep learning, and so on.

Перейти >

Экстремальный C - Камран Амини

2021
C
русский

 Для того чтобы овладеть языком Cи, знания одного лишь синтаксиса недостаточно. Специалист в области разработки должен обладать четким научным пониманием принципов и методик. Книга «Экстремальный Cи» научит вас пользоваться продвинутыми низкоуровневыми возможностями языка для создания эффективных систем, чтобы вы смогли стать экспертом в программировании на .

 Вы освоите директивы препроцессора, макрокоманды, условную компиляцию, указатели и многое другое. Вы по-новому взглянете на алгоритмы, функции и структуры. Узнаете, как выжимать максимум производительности из приложений с ограниченными ресурсами.

 В XXI веке Си остается ключевым языком в машиностроении, авиации, космонавтикн и многих других отраслях. Вы узнаете, как язык работает с Unix, как реализовывать принципы объектно-ориентированного программирования, и разберетесь с многопроцессной обработкой.

 Камран Амини научит вас думать, сомневаться и экспериментировать. Эта книга просто необходима для всех, кто хочет поднять знания Cи на новый уровень.

Перейти >

Effective C - Robert C. Seacord

2020
C
english

 This book is an introduction to the C language. It is written to be as accessible as possible to anyone who wants to learn C programming, without dumbing it down. In other words, we didn’t overly simplify C programming in the way many other introductory books and courses might. These overly simplified references will teach you how to get code to compile and run, but the code might still be wrong. Developers who learn how to program C from such sources will typically develop substandard, flawed, insecure code that will eventually need to be rewritten (often sooner than later). Hopefully, these developers will eventually benefit from senior developers in their organizations who will help them unlearn these harmful misconceptions about programming in C, and help them start developing professional quality C code. On the other hand, this book will quickly teach you how to develop correct, portable, professional-quality code, build a foundation for developing security-critical and safety-critical systems, and perhaps teach you a thing or two that even the senior developers at your organization don’t know.

 Effective C: An Introduction to Professional C Programming is a concise introduction to essential C language programming that will soon have you writing programs, solving problems, and building working systems. The code examples are idiomatic and straightforward.

 In this book, you’ll learn about essential programming concepts in C and practice writing high-quality code with exercises for each topic. You’ll also learn about good software engineering practices for developing correct, secure C code. Go to this book’s page at https://www.nostarch.com/effective_c/ or to https://robertseacord.com/wp/ where we will provide updates and additional material. If you are interested in learning more about secure coding in C, C++, or other languages after completing this book, please check out the training classes offered through NCC Group at https://www.nccgroup.trust/us/our-services/cyber-security/security-training/secure-coding/

Перейти >

Эффективный C. Профессиональное программирование - Роберт С. Сикорд

2022
C
русский

 Мир работает на коде, написанном на C, но в большинстве учебных заведений программированию учат на Python или Java. Книга «Эффективный C. Профессиональное программирование» восполняет этот пробел и предлагает современный взгляд на C. Здесь рассмотрен C17, а также потенциальные возможности C2x. Издание неизбежно станет классикой, с его помощью вы научитесь писать профессиональные и надежные программы на C, которые лягут в основу устойчивых систем и решат реальные задачи.

Перейти >

Algorithms in a Nutshell: A Practical Guide. 2nd Ed - Gary Pollice, George T. Heineman, Stanley Selkow

2016
C
english

We intend this book to be your primary reference when seeking practical information on how to implement or use an algorithm. We cover a range of existing algo‐ rithms for solving a large number of problems and adhere to the following principles:

  •  When describing each algorithm, we use a stylized template to properly frame each discussion and explain the essential points of each algorithm.
  •  We use a variety of languages to implement each algorithm (including C, C++, Java, and Python). In doing so, we make concrete the discussion of algorithms and speak using languages you are already familiar with.
  •  We describe the expected performance of each algorithm and empirically pro‐ vide evidence to support these claims.

 We intend this book to be most useful to software practitioners, programmers, and designers. To meet your objectives, you need access to a quality resource that explains real solutions to practical algorithms you need to solve real problems. You already know how to program in a variety of programming languages. You know about the essential computer science data structures, such as arrays, linked lists, stacks, queues, hash tables, binary trees, and undirected and directed graphs. You don’t need to implement these data structures, since they are typically provided by code libraries.

 We expect you will use this book to learn about tried and tested solutions to solve problems efficiently. You will learn some advanced data structures and novel ways to apply standard data structures to improve the efficiency of algorithms. Your problem-solving abilities will improve when you see the key decision for each algo‐ rithm that make for efficient solutions.

Перейти >

Алгоритмы. Справочник с примерами на C, C++, Java и Python. 2-е изд - Гэри Поллис, Джордж Хайнеман, Стэнли Селков

2017
C
русский

 Пересматривать содержание книги для нового издания всегда сложно. Мы старались сохранить все достоинства первого издания, опубликованного в 2009 году, но при этом исправить его недостатки и добавить новые материалы. Мы по-прежнему следовали принципам, изложенным в первом издании.

  •  Использовать для описания алгоритмов только реальный код, а не псевдокод.
  •  Отделять алгоритм от решаемой им задачи.
  •  Использовать только необходимое количество математических выкладок, и не более того.
  •  Сопровождать математический анализ эмпирическими данными

 Во втором издании мы сократили текстовые описания и упростили макет книги, чтобы освободить место для новых алгоритмов и дополнительных материалов. Мы считаем, что, как и ранее, нам удалось достаточно полно рассказать читателям о важной области информатики, которая оказывает значительное влияние на практические программные системы.

Перейти >

Си на примерах. Практика, практика и только практика - Д. М. Кольцов

2019
C
русский

 Эта книга является превосходным учебным пособием для изучения языка программирования Си на примерах.

 В книге рассмотрена базовая теоретическая часть языка Си, позволяющая ориентироваться в языке и создавать свои программы: операторы, логические конструкции, массивы, связанные списки и деревья, очереди и стеки, работа с файлами.

 Отдельное внимание уделено программированию различных алгоритмов, а также рассмотрению нововведений языка Си на момент 2019 года (стандарты С99, С11, современные практики использования, многопоточность). В книге используется большое количество примеров с подробным анализом кода.

 Будет полезна как начинающим программистам, студентам, так и всем, кто хочет быстро начать программировать на Си.

Перейти >

Smaller C: Lean Code for Small Machines - Marc Loy

2021
C
english

 In a world where new JavaScript frameworks come and go almost daily, why would you dive into an aging, bare-bones language like C? Well, for one, if you hope to keep up with all those framework fads (ouch, opinion alert), you might want a background in just such aging, bare-bones technologies that provide a foundation for so many “modern” languages. Did you look up popular programming languages on a site like TIOBE and find C consistently at the top? Maybe you’re interested in the amazingly advanced video cards and want to see how the software that drives them works. Or perhaps you’re exploring newer—and much smaller—gadgets like Arduinos and heard that C is the right tool for the job.

 No matter the reason, it’s great to have you here. All of those reasons are valid ones, by the way. C is a foundational language and understanding its syntax and quirks will give you a very long-lived computer language literacy that will help you pick up new languages and styles more easily. C (and its cousin C++) are still widely used when writing low-level code for device drivers or operating systems. And the Internet of Things is breathing new life into microcontrollers with limited resources. C is a great fit for wringing the most of those tiny environments.

 While I’ll be focusing on that last idea of writing clean, tight code for tiny, limited machines, I’ll still start with the basics of computer programming and cover a variety of rules and patterns that apply to C anywhere you might find it.

Перейти >