Opening the reading…
Opening the reading…
PROGRAMMING FUNDAMENTALS › C++ FUNDAMENTALS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Build values from 4 and 2, reserve capacity for at least four elements, append 7, 1, and 9, then print the elements, size, and observed capacity. The program must not rely on the final capacity being exactly 8.
OUTPUT
SampleElements: 4 2 7 1 9 Size: 5 Capacity: 8
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.