Hi there, I'm a newbie in C.. I have this Segmentation Fault error from the compiler without any explanation where is the error and where to start checking.. There are parts of my code..
When I call this function, user will input a keyword and the definition up to 3 lines in keyword array and sentence array, respectively. Also, I have to use gets() in this function... While, scanf() is a lot better, lol... So, is there anyway to fix this? ThanksCode:#define SENTENCE 3 struct dictionary_input { char word[80]; char definition[SENTENCE_MAX][80]; } dictionary[ENTRY_MAX]; dictionary_input retrieved_definition() { printf("\nEnter keyword: "); gets(dictionary->word); printf("\nEnter definition up to 3 lines: "); for (i=0; i < SENTENCE; i++) { for(j=0; j < 80; j++) { printf("\nLine 1: "); gets(dictionary->definition[i][j]); } } }