CISC 105 Lab 09 FAQ
For each of the following questions, I'll give suggestions for
"troubleshooting" the problem.
lab09.3.c: do you want us to take in values from the user?
It will be easier to test that way.
lab09.3.c: what does he mean by "reference parameters"?
Reference parameters are passing by pointers. If your function takes
as parameters a, b, and c, after the function is called, a < b < c.
Lab 9, Prob 4
For problem 4, you should read in the message character by character
until the message is too long or until you hit a newline.
lab09.4.c: That means we shouldn't use the function "gets()"?
Not for this lab.
So for lab9.4 we are not reading characters until '\0'?
No, there is no '\0' character on the input stream. The '\0'
character is just the representation of the string in C.
lab09.4.c: Is it possible to prevent the user from entering more
than 30 characters?
No, you can't stop them from typing it. You will only accept the
first 30 into your string, though.
Just like you couldn't really prevent the user from entering too many
integers. I could type 30 4 -1 6 8, but you may only want two of
those integers.
lab09.6.c: For part 6, do you want us to print out anything other than the
comparison?
Yes, in comments, explain what strcmp
returns. Also, at
the end, print out word1, word2, and word3.