SCANF() Function In C Language:

In C programming language, scanf() function is used to read character, string, numeric data from keyboard

For Example:-

#include <stdio.h>

#include<conio.h>

int main()
{
char ch;
char str[100];
printf(“Enter any character \\n”);
scanf(“%c”, &ch);
printf(“Entered character is %c \\n”, ch);
printf(“Enter any string ( upto 100 character ) \\n”);
scanf(“%s”, &str);
printf(“Entered string is %s \\n”, str);
}