Answers for "read terminal input c"

C
0

input value from terminal to c

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
   int rings;
   if(argc != 2) {
       printf("Usage: %s number-of-ringsn",argv[0]);
       return 1;
   }

   rings = atoi(argv[1]);
   printf("Using number-of-rings = %dn", rings);
...

   return 0;
}
Posted by: Guest on January-19-2021
0

input value from terminal to c

int main(int argc, char* argv[]){/*...*/}
Posted by: Guest on April-06-2020

Code answers related to "C"

Browse Popular Code Answers by Language