Hmm...try
valgrind --tool=memcheck --leak-check=yes ./prosqueeze
with the dot-slash, it may be a path issue.
Type: Posts; User: anduril462
Hmm...try
valgrind --tool=memcheck --leak-check=yes ./prosqueeze
with the dot-slash, it may be a path issue.
temp = malloc(MAXLINE * sizeof(char));
Where do you free temp? I already told you to look into tools like valgrind (see post #8, near the bottom).
Now you've introduced a different buffer overflow. If the user says they want to enter 26 letters, and they put commas in between each one, fgets wont read them all because 26 letters + 25 commas is...
Don't just read the prototype. Try reading the whole man page (or at least all the relevant parts).
The man pages for any C function will have a "RETURN VALUE" section, describing the value...
Since you didn't provide the new version of your code, I must assume you only made the changes you mention in the above post.
This is still not a fix. All it amounts to is a broken...
I don't really know what you mean by "need of malloc". You do not need malloc for this program, and you're using it incorrectly.
s = malloc(MAXLINE * sizeof(char*));
t = malloc(ALPHA *...
This is a very common problem when mixing line input (fgets), formatted input (scanf) and character input (getchar/fgetc). After you input 4, you press enter, which puts a '\n' (new line) in the...