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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.