For Loop in Programming Language - Quiz

  • A for (i = 0, i < 10, i++)
  • B for (int i = 0; i < 10; i++)
  • C for (int i = 0: i < 10: i++)
  • D for i in range(10)
  • A Initialization
  • B Condition check
  • C Increment
  • D Loop body
  • A The loop will never end
  • B The loop will result in an error
  • C The loop will run indefinitely
  • D The loop will execute only once
  • A for (i = 0; i < 5; i++)
  • B for i in range(5)
  • C for i = 1; i < 5; i++
  • D foreach (i in collection)
  • A It requires a counter
  • B It works only with arrays
  • C It iterates over a collection without an index
  • D It can modify the loop control variable
  • A The loop will terminate
  • B The loop may behave unexpectedly
  • C The loop will skip the next iteration
  • D The loop will not execute
  • A Using exit()
  • B Using return
  • C Using break
  • D Using continue