Q. Which of the following parts of the for loop can be eliminated in C?

  • (A) init
  • (B) condition
  • (C) increment
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of these
Explanation: Syntax of for loop:

for(init, condition, increment){
}
Inside the initialization statement (init), any of the three init or condition or increment can be eliminated i.e., all are optional. The loop can work without them also.
Explanation by: Chandani
Syntax of for loop:

for(init, condition, increment){
}
Inside the initialization statement (init), any of the three init or condition or increment can be eliminated i.e., all are optional. The loop can work without them also.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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