You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

12 lines
222 B

  1. #include <string.h>
  2. #include <unistd.h>
  3. // C++-style comment; for-decl; optind
  4. int main(int argc, char **argv) {
  5. int sum = 0;
  6. for (int i = optind; i < argc; i++)
  7. sum += strlen(argv[i]);
  8. return sum;
  9. }