Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThing is... I'm not new to programming, I've done extensive work in PHP (and the related web technologies). But two weeks ago I wanted to pick C, this time for good (yes, I do have past attempts, but school was taking way too much time, so I had to give up). So I bought this book and I'm trying to follow it thoroughly. There have been many places where I could have used things like... functions, but I didn't want to, because, as I said, that's the subject of the next chapter, and I'm not trying to rush things. I'm gonna try making the most out of your suggestions. Thanks!
      singulars
    2. COno problem, glad to help! this is a bit of a large first project messing with strings in c. each of the sub-problems i mentioned (which should go into a separate function each) would be a good place to start. write a program to find either a `'.'` or a `'?'` in a string, and figure out the index. write a program to reverse all the of the characters in a string, all the way to the end (not the `'\0'` though!). and write a program that finds and prints out the individual words in a sentence. if you can do those three things separately, you can add them together to solve this larger problem. :-)
      singulars
    3. COI was thinking of writing the first function you suggest, as it would be way easier to look for the end of the input string by using a function with a variable number of arguments. But I'm not supposed to know how to write a function, so, as I said, I'll have to come up with an ad-hoc solution. As for the second function, do I need two arrays, or am I missing something? Finally, is my idea of defining words as sequences of characters delimited by spaces a good one?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload