Computers and Technology

This function receives three parameters: line[], a C string ending in '\n'; word[], a C string, consisting of characters that are not whitespace (spaces, tabs, newlines, etc.), to be extracted from line[]; and size, the maximum number of characters that can be copied into word[]. The function should copy characters one-by-one from line[] into word[], stopping at whitespace, punctuation characters (e. g. ., ;, [) or after writing size characters (remember that valid C strings must end in '\0'). If the function is invoked again with the same line[] parameter, it should extract the next word from the line. In other words, the function should resume copying where the last copy stopped. If the function is invoked with a new line[] parameter, it should start copying from the beginning of the line. The function should return 1 if some characters were copied and 0 if no characters were copied and the end of line[] was reached. Hint: You may use the functions isspace() and ispunct() from ctype. h to determine if a character is whitespace.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:50, ashiteru123
What is the difference between windows 7 and windows 10?
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, mikeysoulemison
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
image
Computers and Technology, 23.06.2019 12:00, clevelandjaniya1
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, jhitotw
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
Do you know the correct answer?
This function receives three parameters: line[], a C string ending in '\n'; word[], a C string, cons...

Questions in other subjects:

Konu
History, 20.01.2021 22:10
Konu
Mathematics, 20.01.2021 22:10
Konu
English, 20.01.2021 22:10
Konu
Mathematics, 20.01.2021 22:10