f2380eef05
git-subtree-dir: lcthw-remnants git-subtree-mainline:4107485591
git-subtree-split:e172f73c82
36 lines
586 B
C
36 lines
586 B
C
#include <stdio.h>
|
|
#include <ctype.h>
|
|
#include <string.h>
|
|
|
|
void print_letters(char arg[], int nchars);
|
|
|
|
void print_arguments(int argc, char *argv[])
|
|
{
|
|
int i = 0;
|
|
|
|
for(i = 0; i < argc; i++) {
|
|
print_letters(argv[i], strlen(argv[i]));
|
|
}
|
|
}
|
|
|
|
void print_letters(char arg[], int nchars)
|
|
{
|
|
int i = 0;
|
|
|
|
for (i = 0; i < nchars; i++) {
|
|
char ch = arg[i];
|
|
|
|
if(isalpha(ch) || isblank(ch)) {
|
|
printf("'%c' == %d ", ch, ch);
|
|
}
|
|
}
|
|
|
|
printf("\n");
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
print_arguments(argc, argv);
|
|
return 0;
|
|
}
|