21.7k views
5 votes
This function causes a program to terminate, regardless of which function or control mechanism is executing.

A) terminate()
B) return()
C) continue()
D) exit()

1 Answer

5 votes

Answer:

Option D is the correct choice answer for the above question.

Step-by-step explanation:

"exit()" is a function that is used to transfer the control of the program to the end of the program and the program gets terminated. This function defines in many programming languages. The syntax of this function is as follows--

exit() // syntax of the exit function.

Hence anybody can say that "exit" function is used to terminate the program if there are many lines belongs after the "exit()" function. Hence option D is the correct answer while other is not because--

  • Option A states about the "terminate()" function which is not the function of any programming language.
  • Option B states about the "return()" function which is also not the function of any programming language but "return" is a statement used to return the value.
  • Option C states about the "continue()" function which is used in a loop to escape the other line of the loop and continue it.
User Batajus
by
5.8k points