You are here:   HomeC Programming (Theory)
 
by Dinesh Thakur Category: Basic Of C Programming

The function printf () is used for displaying the output of a program on the monitor, while the function scanf () is used for providing input to the program from keyboard. We shall first discuss printf(). If only a text statement is to be displayed on the monitor as was done in Program, then the argument of the function printf() is the string enclosed in double quotes (" " ) as illustrated below.

 
by Dinesh Thakur Category: Basic Of C Programming

The function getchar () reads a single character at a time, i.e., it gives access to a single character which may be manipulated. For instance, the character may be changed by a new character, a lowercase letter may be changed to an upper case letter or vice versa, or a character may be removed from the string, and so on. However, for reading the complete string you have to use a loop.

 

Page 4 of 79

What's New and Popular