Podcast
Questions and Answers
What is the purpose of the initialization part in the for loop in C++?
What is the purpose of the initialization part in the for loop in C++?
- It initializes variables and is executed only once before the loop execution (correct)
- It stores multiple values of the same datatype
- It prints 'Hello world' 10 times
- It updates the value of initialized variables and checks the loop condition
What does a loop within another loop called in C++?
What does a loop within another loop called in C++?
- Array loop
- For loop
- Loop continuation
- Nested loop (correct)
What is the purpose of an array in C++?
What is the purpose of an array in C++?
- To store multiple values of the same datatype (correct)
- To initialize variables and execute once before the loop
- To update the value of initialized variables and check the loop condition
- To print 'Hello world' 10 times