Dayrvia
C

C · Indexing and loops · Practice questions

Try 2 questions on C · Indexing and loops, then read the explanations and review the related concepts.

Practice questions

Choose an answer and move to the next question. Grade the last one to see explanations and review links.

2 questions
Q1 Which expression reads the last element?
int a[] = {3, 7, 9};
Q2 What is s after the loop?
int s = 0;
for (int i = 1; i < 5; i += 2) s += i;
Original practice questions written for Dayrvia.