错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Signals in C

  • Orhan Gazi

摘要

In this chapter, we explain signals topic in C programming. Signals are used when the normal flow of the program is to be paused and a special function is to be executed when a specific event occurs. Signals can be generated manually, for instance, by pressing Ctrl + C key; or they can be generated by hardware inputs, for instance, by receiving an input from a port of a computer; or they can be generated when a specific event occurs, for instance, when 0/0 division is performed in a mathematical calculation; or we can define a special event, for instance, when 1.23 is obtained; and upon the occurrence of all these events, the normal flow of the program is halted and a special function either written by the user or a built-in one is called.