You copied the Doc URL to your clipboard.

Library functions called from main()

The function main() is the user-level root of the application. It requires the execution environment to be initialized and input/output functions to be capable of being called. While in main() the program might perform one of the following actions that calls user-customizable functions in the C library:

  • Extend the stack or heap.

  • Call library functions that require a callout to a user-defined function, for example __rt_fp_status_addr() or clock().

  • Call library functions that use locale or CTYPE.

  • Perform floating-point calculations that require the floating-point unit or floating-point library.

  • Input or output directly through low-level functions, for example putc(), or indirectly through high-level input/output functions and input/output support functions, for example, fprintf() or sys_open().

  • Raise an error or other signal, for example ferror.