read from stdin in C code example
Example 1: what is stdin in c
//stdin accesses the keyboard, it's a file pointer
Example 2: read from stdin c
#include <stdio.h>
int main( ) {
char str[100];
int i;
printf( "Enter a value :");
scanf("%s %d", str, &i);
printf( "\nYou entered: %s %d ", str, i);
return 0;
}