我在下面的程序中尝试了数组、带字符串的指针,但我不知道我哪里出错了。
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
// finding out the uper case and lower case in a string
int main()
{
char *arr_1[] = {"CalCulaTor", "DoveTail", "MachiNing"};
int i = 0, j;
while(*(arr_1 + i) != '\0')
{
printf(" %d letter is %s ",i,islower(*(arr_1 + i)) ? "Lower case " : "Not lower case");
printf("\n");
i++;
}
system("PAUSE");
return 0;
}