C Programming
eBook - ePub

C Programming

Learn to Code

Sisir Kumar Jena

Buch teilen
  1. 428 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

C Programming

Learn to Code

Sisir Kumar Jena

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

The C programming language is a popular language in industries as well as academics. Since its invention and standardized as ANSI C, several other standards known as C99, C11, and C17 were published with new features in subsequent years. This book covers all the traits of ANSI C and includes new features present in other standards. The content of this book helps a beginner to learn the fundamental concept of the C language. The book contains a step-by-step explanation of every program that allows a learner to understand the syntax and builds a foundation to write similar programs. The explanation clarity, exercises, and illustrations present in this book make it a complete textbook in all aspects.

Features:



  • Other than ANSI C, the book explains the new C standards like C99, C11, and C17.


  • Most basic and easy-to-follow programs are chosen to explain the concepts and their syntax.


  • More emphasis is given to the topics like Functions, Pointers, and Structures.


  • Recursion is emphasized with numerous programming examples and diagrams.


  • A separate chapter on the command-line argument and preprocessors is included that concisely explains their usage.


  • Several real-life figures are taken to explain the concepts of dynamic memory allocation, file handling, and the difference between structure and union.


  • The book contains more than 260 illustrations, more than 200 programs, and exercises at the end of each chapter.

This book serves as a textbook for UG/PG courses in science and engineering. The researcher, postgraduate engineers, and embedded software developers can also keep this book as reference material for their fundamental learning.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist C Programming als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu C Programming von Sisir Kumar Jena im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in C. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2021
ISBN
9781000460582

1 Introduction to the Computer

DOI: 10.1201/9781003188254-1

1.1 Introduction

Perhaps the most powerful and resourceful tool ever created by humanity is the computer. The term “computer” could mean a device that calculates. But nowadays a computer can do a variety of jobs. If you take any field, be it engineering, healthcare, automotive devices, gaming, or entertainment, everywhere a computer is used to do the task. This chapter introduces how computers came into existence and describes the different components associated with a computing device. After completion of this chapter, the reader will have learnt the following:
  1. What a computer is, and how may we define it.
  2. A brief history of the computer and how it came into existence.
  3. What the different components of a computer system are, and how they are organized.
  4. Be able to define a memory subsystem, its categories, and its organization.
  5. Understand the importance of an Operating System (OS) and its functionality.
This chapter’s content is purely elementary and not meant for those who know the basics of computer systems. Those with a moderate knowledge of any computer language can skip this chapter. We will start the chapter by introducing the definition of a computer system and its characteristics.

1.2 Definition and Characteristics of a Computer System

The development of a computer system has a long history, which includes the work done by several great minds. In this modern era, we can consider a computer as a system that processes data and produces useful information. Though there is no formal definition that defines a computer, we will try to propose a definition:
A computer is an electronic device that receives input through an input device, stores it in the storage device (memory), and manipulates or processes the data to produce information (output) through an output device.
Analyzing the definition, you may notice four crucial components of a computer system: (1) input device, (2) output device, (3) storage device, and (4) the processing device. The overall organization of all these components is discussed later in this chapter. The above defines a computer system as a data processing machine. But it is not only a data processing unit. Rather, it has several capabilities that need to be discussed here in the form of its characteristics. We could not complete the definition without knowing the characteristics of a computer system. Figure 1.1 shows the essential characteristics of a computer system collected from [1].
  • Speed: A computer is a high-speed electronic device which takes a negligible amount of time to perform any task compared to the speed of any human being.
  • Accuracy: Computers are very accurate in producing the correct output. A computer produces the wrong result only when the user has made a mistake.
  • Automatic: Computers execute the task assigned to them without any intervention until the job gets finished.
  • Diligence: Computers never tire. They can work continuously and produce correct and consistent results every time.
  • Versatility: A computer is capable of doing different tasks. We all know that nowadays computers are used everywhere.
  • Memory: A computer is potent at remembering things and never forgets them. Whatever we store in computer memory will be there throughout its lifetime.
Five characteristics of the computer showing as bubbles around a computer icon.
Figure 1.1 Characteristics of a computer.

1.3 History of the Computer

The computer has a long history of development. The objective of this book is something different. So in this section, we only provide an overview of how the computer came into existence by highlighting some inventions. The origin of the entire development is not essential to us, but I would like to start with Charles Babbage’s (see Figure 1.2a) contribution. He is known as the father of the digital programmable computer.
Figure 1.2 (a) Charles Babbage; (b) John von Neumann.
The work of Babbage describing a “difference engine” was used by many researchers as inspiration for further development [2], leading to several working models but with the disadvantage that the programs were hardwired and challenging to change. A final and major contribution was made during the 1940s by John von Neumann (see Figure 1.2b), known as the “stored program.” With a stored program, we can control a computer system’s activity, and this program is usually stored inside the computer’s memory [2]. In today’s modern world, digital computers are all built based on this stored-program concept. A brief contribution to computer development in chronological order is [3]:
  • The German philosopher and mathematician, Gottfried Leibniz (1646–1716), built the first calculator to perform multiplication and division. It was not reliable due to the inaccuracy of its parts.
  • Charles Babbage (1792–1872) (Figure 1.1a) was a British inventor who designed his difference engine in 1822 and, in 1842, came up with an “analytical engine” incorporating the ideas of a memory and card input/output for data and instructions. But he was not able to build the system. Babbage is mostly remembered for and considered as the father of digital computers.
  • Howard Aiken (1900–73), a Harvard professor with IBM’s backing, built the Harvard Mark I computer (51 ft long) in 1944. It required three seconds to perform multiplication.
  • John Vincent Atanasoff built a specialized computer in 1941 and was visited by Willaim Mauchly before constructing the Electronic Numerical Integrator and Calculator (ENIAC).
  • J. Presper Eckert and Mauchly designed and built the ENIAC in 1946 for military computations. It used vacuum tubes (valves), which were totally electronic (and operated in microseconds), instead of the electromechanical relay.
  • Von Neumann was a scientific genius and a consultant on the ENIAC project. In 1950, he formulated plans with Mauchly and Eckert for a new computer, the Electronic Discrete Variable Automatic Computer (EDVAC), which was to store programs as well as data.
  • At the same time (1950), another computer named the Electronic Delay Storage Automatic Calculator (EDSAC) was developed by Maurice Wilkes at Cambridge University in England.
  • After the above inventions, every computer built followed the von Neumann architecture. Several generations of computers have been developed, but the overall architecture remains the same.
The reader of this book is encouraged to find out more on computer generations and present computer system scenarios.

1.4 Basic Computer Organization

Before we can understand basic computer organization, see Figure 1.3 of a desktop computer system and its components. There are five components that we usually see: (1) the keyboard; (2) the mouse (3); the monitor; (4) the cabinet; (5) the speaker. We also see some other components, ...

Inhaltsverzeichnis