1/9
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What does x++ do in C++?
Increments the value of x by 1 (post-increment).
What does y-- do in C++?
Decrements the value of y by 1 (post-decrement).
What is a count-controlled loop?
A loop that repeats a specific number of times, often using a counter variable (e.g., for loop).
What is a sentinel-controlled loop?
A loop that continues until a special "sentinel" value is entered to signal the end of input.
How can loops be used for counting, summing, or averaging?
By initializing accumulators or counters and updating them each iteration to compute totals or averages.
How can loops be used to find a maximum or minimum value?
By comparing each input value to a stored max or min and updating it when a larger or smaller value is found.
What is a nested loop?
A loop inside another loop; the inner loop runs completely for each iteration of the outer loop.
What is an infinite loop?
A loop that never terminates because its condition is always true or never updated properly.
What is the scope of a variable in C++?
The part of the program where the variable can be accessed, usually within the { } block where it is declared.
What is incremental development in software development?
Building and testing a program step by step to catch errors early and ensure each part works before adding more complexity.