我在下面的程序中尝试过数组,指向字符串的指针,但我不知道自己出错的地方。尝试使用数组和指针islower ...得到错误?
#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;
}
感谢您的建议...我设法得到它....我感谢您的努力..谢谢! – studyembedded 2013-03-08 04:25:43