Input and output in C:-
In C programming you can use Scanf() and Printf () function to read and print data.Example:
#include<stdio.h>
void main() { int a,b,c; printf("enter any two numbers: \n"); scanf("%d %d", &a, &b); c = a + b; printf("addition of two number is: %d", c); }
Output:-
enter any two numbers:
15
5
addition of two number is: 20
Note:
Scanf() : is used to take input from the user.
Printf (): is used to display result on the screen.