To access the last character of a string class object str you can use the expression

A) str[last].
B) str.last().
C) str[str.length()].
D) str[str.length()-1].
E) None of the above


D) str[str.length()-1].

Computer Science & Information Technology

You might also like to view...

Explain how headers are added and removed as data passes through a layered protocol stack.

What will be an ideal response?

Computer Science & Information Technology

Discuss the trade-offs between giving each process more page frames than it needs (to prevent thrashing) and the resulting fragmentation of main memory.

What will be an ideal response?

Computer Science & Information Technology

When you give a presentation with hidden slides, you have the option of revealing the hidden slides while displaying the presentation

Indicate whether the statement is true or false

Computer Science & Information Technology

To create a site map for a website, one must know how many pages to include in the website.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology