C Programming
eBook - ePub

C Programming

Learn to Code

Sisir Kumar Jena

Partager le livre
  1. 428 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

C Programming

Learn to Code

Sisir Kumar Jena

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que C Programming est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  C Programming par Sisir Kumar Jena en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Programming in C. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2021
ISBN
9781000460582
Édition
1

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, ...

Table des matiĂšres