Reading Input from Keyboard Another way of assigning values to variables besides directly assigning the value is reading values from the keyboard. C provides scanf function in the stdio.h header file. Using this function we can read values from the keyboard and assign the values to variables. The syntax of scanf function is as shown below: The control string specifies the type of value to read from the keyboard and the ampersand symbol & is an operator to specify the address the variable(s). Example usage of scanf function is shown below: Printing onto Screen To print or output text onto the
The post What are different ways of I/O in C programming appeared first on Coding Security.
What are different ways of I/O in C programming
read more
Tidak ada komentar:
Posting Komentar