Machine-translated by Google. Questions are authored in English.
Top

Discussion

#pragma exit is primarily used for?

  • A.Checking memory leaks after exiting the program
  • B.Informing Operating System that program has terminated
  • C.Running a function at exiting the program
  • D.No such preprocessor exist

Answer: C

Correct answer: Running a function at exiting the program

#pragma exit nominates a function to be run as the program terminates, after main returns - the counterpart of #pragma startup. Both are Borland extensions rather than standard C; the portable equivalent is atexit().

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.