Answer:
You forgot to add a group of choices, however assuming this programming language uses 0-based indexes the answer would be x - 1
Explanation:
Zero based index languages have array indexes starting at 0. When you create that array, you use x to define the amount of elements, however due to the array starting at the index 0, the arrays highest index would be x - 1 instead of x.
Undo is Ctrl-Z. Undo buttons also exist in most non-Notepad text editing programs.
Int Main () dvaunoax o]inxoo jnjn os'i
Explanation: Int Main KIcqvd[uo v[ionon
hxbc ;zzzzzzzzzzzczjHiuhqvzbp;'k
Answer:
- Use the one that reads most clearly.
- If you can’t decide, just pick one.
- If you can’t then use for()
- If at any point later in time you change your mind, refactor your code.
This is how professionals work. Decide, and for all things with low impact to change, don’t sweat it.
Save that for architectural and API design choices.
Answer#2:
- Well if you are looking for a simple technique to choose which loop to use you can use these rules.
- Use for loops when there's a sequence of elements that you want to iterate.
- Use while loops when you want to repeat an action until a condition changes.
And if whatever you are trying to do can be done with either for or while loops then just choose your favourite :)