Hi,
Can anyone tell me if i have done these functions correctly; i maybe missing something; maybe thats why im getting segmentation fault!!!
#include "listFuns.h"
#include <stdlib.h>
#include <stdio.h>
listADT stringToList(char str[])
/* desc: converts a C string (array of char) into the */
/* corresponding word (list of characters) */
{
listADT temp;
return temp;
}
void displayList(listADT list)
{
if(!isEmptyList(list))
{ // if the list is not empty
printf("%c", headList(list)); // print the character at the current head of the list
displayList(tailList(list)); // call the function again with the next character in the list
}
printf("\n"); //print a new line
}
boolean precedesList(listADT list1, listADT list2)
/* desc: returns TRUE if the word in list1 is alphabetically */
/* before that in list2 */
{
return FALSE;
}
boolean equalsList(listADT list1, listADT list2)
/* desc: returns TRUE if the word in list1 is equal to that */
/* in list2 */
{
return FALSE;
}