What are the mistakes i did in the code ? It is not giving any output. The question is given in the image. I am using the ASCII variable set to print the set of alphabet and digits .
#include <ctype.h>
#include <stdio.h>
#include <string.h>
int main()
{
int i, j, temp, t, s, e;
char test[20], start = 'a', end = 'z';
scanf("%s", test);
for (i = 0; i < strlen(test) && (test[i] == '-'); i++);
for (; i < strlen(test););
{
if (isalpha(test[i]) != 0)
{
start = test[i];
for (; (i < strlen(test)) && (isdigit(test[i]) == 0); i++);
}
end = test[i - 1];
temp = end - start + 1;
if (isdigit(test[i]) != 0)
{
s = test[i];
for (; (i < strlen(test)) && (isalpha(test[i]) == 0); i++);
}
e = test[i - 1];
t = e - s + 1;
for (j = 0; j < temp; ++j, start++)
{
printf("%c", start);
}
printf("\n");
for (j = 0; j < t; ++j, s++)
{
printf("%c", s);
}
printf("\n");
}
return 0;
}