We are going over a sample test paper for a course and would like assistance from a C programmer translating pseudo code into C code.
We are having a disagreement becasue two of the possible options look correct. (I am NOT a programmer and nor are my colleagues)
The pseudo code is:
"If we have written 200 characters to the buffer variable, the stack should stop because it cannot hold any more data."
The possible answers are:
- If (i >= 200) then exit
- If (i > 200) then exit
- If (i < 200) then exit
- If (i <= 200) then exit
We know the answer is NOT 3 and 4.
I beleive that the answer is "2" (if 200 characters have been written; end the program), but my colleagues believe that the correct answer is "1" (if 200 or more characters have been written; end the program).
Please advise as to what the correct answer is.
thenat all. They're all incorrect.iis indexed (from zero or one or something else).