80 likes | 162 Views
The C programming language has the feature of scanf () function, which is used to take the input by the user as per the requirement. The coders also use the printf () function in the programs to display the programu2019s output.<br><br>https://www.ducatindia.com/javatraining/
E N D
Language | Industrial Training | Digital Marketing | Web Technology | Testing+ | Database | Networking | Mobile Application | ERP | Graphic | Big Data | Cloud Computing Input / Output in C WELCOME TO DUCAT iNDIA 7070905090 info@ducatindia.com
Input / Output in C The C programming language has the feature of scanf () function, which is used to take the input by the user as per the requirement. The coders also use the printf () function in the programs to display the program’s output. Printf () function or Output in C programming language The printf () is one of the most common output functions of C programming language, which is used to send the formatted output on the screen. Example 1: Output in the form of string. Output:
Explanation: • All the valid programs must hold the main () function in the C programming language. The execution of a particular code begins from this main () function. • The printf () is the library function in C language, which is used to send the screen’s output. This function can also print the string inside the quotations provided by the user. • The user needs to include < stdio.h> header file to use printf () function in the particular program. • The return statement inside the main () function provides the exit status of the program, which is optional. Example 2. Output in the form of integer with the help of program. Output:
Example 3: Output in the form of float and double inside the program. Output:
Example 4: Output in the form of Character via program of C language. Output:
Scanf () function or input by the user in C programming language Scanf () function is the common input function of the C programming language, which is used to take the input from the user as per the requirement. This function can read the formatted input from the standard input, like input given by the keyboard. Example: Output: enter the number: 7 Number = 7
THANK YOU Input / Output in C 7070905090 info@ducatindia.com