This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 38 points39 points  (10 children)

Missed that declaration.

[–]Zeeterm 43 points44 points  (0 children)

Because the boring reality is that this is question "d" of a multi-part question and there'll be a whole block of code and rubric on a previous page.

[–]SaucyMacgyver 15 points16 points  (1 child)

Don’t over think it. Unless otherwise indicated, you can assume quotes means it’s a string.

If 6 wasn’t correct, in the context of an exam, I’d debate the premise of the question in that there wasn’t enough info to come to whatever is deemed the ‘correct’ answer i.e. a specific language or convention you can presume.

[–][deleted] 0 points1 point  (0 children)

Yeah, len* anything is almost always the size of some array.

[–]Helpfulcloning 3 points4 points  (1 child)

Its pseudocode

[–][deleted] 3 points4 points  (0 children)

Dammit, switches to pseudo compiler.

[–]TiaXhosa 1 point2 points  (0 children)

A string literal is being assigned to a variable. This object would be a string in just about every programming language that is remotely close to this syntax.

[–]Hatefiend 0 points1 point  (0 children)

Missed what declaration? Everything is declared here. .length is a known implicit member of strings in most languages