Check out example codes for "read from stdin c". It will help you in understanding the concepts better.

Code Example 1

#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;
}

Learn ReactJs, React Native from akashmittal.com