CHAPTER 4

Input and Output in C

Chapter Outline
4.1  INTRODUCTION

Reading input data, processing it and displaying the results are the three tasks of any program. The data is read from the input device such as a keyboard. Operations on the data are performed on the basis of the operators, and the result is displayed on the screen. All the three tasks are important and none of them can be ignored.

There are two ways to accept the data. In one method, a data value is assigned to the variable with an assignment statement. The programmer writes assignment ...

Get Programming in C, 3/e, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.