C Programming
eBook - ePub

C Programming

Learn to Code

Sisir Kumar Jena

Compartir libro
  1. 428 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

C Programming

Learn to Code

Sisir Kumar Jena

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es C Programming un PDF/ePUB en línea?
Sí, puedes acceder a C Programming de Sisir Kumar Jena en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in C. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9781000460582
Edición
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, ...

Índice