You are here:   HomeC Programming (Theory)Basic Of C Prog.
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 9



Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular





Popular Article