Skip to content

Q-17, Activity 2.5.2.2. Minor fixes #198

@PeturOA

Description

@PeturOA

A few related minor issues in Activity 2.5.2.2., section 2.5.2.:

  1. The question asks what cout << *ptrN << endl; would print and marks the correct answer as varPtr: 50, but that is not technically correct. It would only print 50. If the intention is to print varPtr: 50 the statement should be cout << "varPtr: " << *ptrN << endl;. As it is, option e is actually the (technically) correct one (although marking it as such would make this a bit of a trick question). Also, varPtr seems to be an older name of the pointer in the example, should probably be updated to ptrN now.

  2. The feedback for answer a is inconsistent with the answer itself, after the value was changed from 100 to 9 in commit 8ab95eb.

  3. The feedback for answer c is also inconsistent with the answer. Judging the intention by the feedback text, the answer should be updated to be 59, rather than 150.

  4. The question itself could be a little clearer about where this extra code should be inserted. Clearly, it needs to be inserted after line 7, for example between lines 7 and 8, rather than "into line 7-8", which could mean the same thing but is a little vague.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions