Question
When I enter 'l' it gives me this error is there a way to fix this? #define _CRT_SECURE_NO_DEPRECATE #include #include #include #include int main(int argc,
When I enter 'l' it gives me this error is there a way to fix this?
#define _CRT_SECURE_NO_DEPRECATE #include
int main(int argc, char **argv) { char *filename = NULL; char string[100], word[20], max[20], min[20], c; char words[100][100]; int i = 0, j = 0, flag = 0, count = 0,k;
if (argc
} else { FILE *in; printf("In file reading "); in = fopen(filename, "r"); if (!in) { printf("Unable to open file for reading "); return -1; } while((c = fgetc(in)) != EOF) { i = 0; printf("%c",c); string[i++] = c; if( c == ' ') string[i - 1] = '\0'; } } if( c == EOF) string[i - 1] = '\0'; /ow construct the array of words for (i = 0; i
}
79% ./lab3b Usage: words l s filename , either l or s or both can be used as command line, f ilename optional 80% ./lab3b-1 Enter string: I am testing this code /lab3b: option requires an argument ' Words areI am testing this code 1 command line option not find ~ 81%Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started