Q. Which of the following is valid syntax for creating a while loop?

  • (A) while{ } (condition)
  • (B) while(condition){ }
  • (C) while{ }
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) while(condition){ }
Explanation: The correct syntax for creating a while loop is:

while(condition){
}
Explanation by: Chandani
The correct syntax for creating a while loop is:

while(condition){
}

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
274
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
80%
Success Rate