I am writing a program to see if the next character that isn't a \n \t or ' ' is a punctuation or a letter. I have this function but i get a seg fault. Does isalpha or ispunct mess with memory somehow or something??Code:int search_for_word(char *string,int offset){ offset=0; /*just for this example*/ while((!isalpha(string[offset])) || ((!ispunct(string[offset])))){ offset++; } printf("X == %d\n",offset); if((isalpha(string[offset]))){ return 1; } else{ return 0; } return 1; }