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
Declare the local array marks with the values 12, 7, 19, and 3. Print each index, its value, and its byte offset from the start of the array, then print the array's total byte count using sizeof.
OUTPUT
Sampleindex 0: value 12, offset 0 index 1: value 7, offset 4 index 2: value 19, offset 8 index 3: value 3, offset 12 total bytes: 16
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.