Writing a character in #C (module 15)
In this section we will discuss on writing a character using many inbuilt #C functions like printf, putchar(), puts, putche, putch etc.
Do you have similar website/ Product?
Show in this page just for only
$2 (for a month)
0/60
0/180
This is the 15th module on learning C with us. Earlier we discussed on the basic introduction and structure of C, preprocessor it's features, intermediate and executable codes. compilation and execution process of a C program. And keywords and identifiers, data types, variables and constants, scope of variables, operators and expressions in C. Type casting in #C. Introduction to input and output functions and reading a character in #C.
In this section we will discuss on writing a character using many inbuilt #C functions like printf, putchar(), puts, putche, putch etc.
Writing a character :-
We know that there are many inbuilt functions for reading a text or character in #C like scanf, getchar, getch etc.. Same as that there are many functions for also writing a character like printf, puts, putchar, putch, putche etc.
This take form as shown below :
putchar (variable_name);
Here putchar is an inbuilt function used for printing any char type variable_name as an output.
This can be better understand by taking an example of program :
Input :
#include main() { char a; printf("enter any character"); printf("\n"); a = getchar(); putchar(a); } |
Output :
enter any character Y Y enter any character H H |
For module on reading a character in #C you may refer on the below link :-
In the next module we will discuss on the formatted input and unformatted input and output functions in #C. For more information please be updated with us only on Www.newsandstory.
CONTINUE READING
Programming
coding
learning
Dalpat I
Content writer