scanf usage example C
Example 1: scanf in c
#include <stdio.h>
int main () {
scanf("%s", str);
printf("%s"str);
scanf("%d", int);
printf("%d"int);
return(0);
}
Example 2: how to scanf in c
#include <stdio.h>
int main()
{
int testInteger;
printf("Enter an integer: ");
scanf("%d", &testInteger);
printf("Number = %d",testInteger);
return 0;
}