Using strtok() together with fgets() causes a segfault, but pointers should be correct?

Most likely problem is that your first input line doesn't begin with a lower case letter, so you never call strtok in the first place, and never assign to either svar or fvar, but you still pass those (uninitialized) values to printf, which then gives a segfault...

Strtok can return NULL. If you ignore that possibility, access violations are easy to cause. Always check the return status of a function you call.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions