MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your C knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
IN_THE_C_LIBRARY_FUNCTION_VOID_(*SIGNAL(INT_SIG,_VOID_(*FUNC)(INT)))(INT),_WHICH_STATEMENT_IS_TRUE_WITH_RESPECT_TO_FUNC??$ |
| A. | func is a pointer to the function |
| B. | func is pointer to sig |
| C. | func is a static variable |
| D. | func is a pointer that points to all type of data |
| Answer» B. func is pointer to sig | |
| 2. |
void (*signal(int sig, void (*func)(int)))(int);If the value of func is SIG_IGN then ________? |
| A. | the signal will be ignored |
| B. | default handling for that signal will occur |
| C. | The signal() function will fail to execute |
| D. | the signal will be ignored |
| Answer» B. default handling for that signal will occur | |
| 3. |
The sig argument specifies the signal, which may be any signal except _______ and _________ |
| A. | SIG_DFL, SIG_IGN |
| B. | SIGKILL, SIGSTOP |
| C. | SIG_KILL, SIG_STOP |
| D. | SIGCHLD, SIG_IGN |
| Answer» C. SIG_KILL, SIG_STOP | |
| 4. |
______ gives receipt of an interactive attention signals. |
| A. | SIGILL |
| B. | SIGTERM |
| C. | SIGINT |
| D. | SIGFPE |
| Answer» D. SIGFPE | |
| 5. |
Which of the following is the correct description of the macro SIGFPE? |
| A. | erroneous arithmetic operation such as zero divide |
| B. | invalid access to storage |
| C. | termination request sent to the program |
| D. | receipt of the interactive attention signal |
| Answer» B. invalid access to storage | |
| 6. |
Select the macro that abnormally terminates the program. |
| A. | SIGILL |
| B. | SIGTERM |
| C. | SIGABRT |
| D. | SIGFPE |
| Answer» D. SIGFPE | |
| 7. |
Which among the given header file is used to handle different signals reported during program execution? |
| A. | stdarg.h |
| B. | assert.h |
| C. | signal.h |
| D. | setjmp.h |
| Answer» D. setjmp.h | |
| 8. |
What is the type declared by the header file signal.h? |
| A. | sig_atomic_t |
| B. | sig_signal_t |
| C. | sig_signal_h |
| D. | sig_stomic_h |
| Answer» B. sig_signal_t | |
| 9. |
What does raise functions declared in signal.h do? |
| A. | reports a synchronous signal |
| B. | let’s you specify handling of signals |
| C. | reports a asynchronous signal |
| D. | doesn’t let you specify handling of signals |
| Answer» B. let‚Äö√Ñ√∂‚àö√ë‚àö¬•s you specify handling of signals | |
| 10. |
Select the right statement. |
| A. | synchronous signal occurs because of the action that your program takes |
| B. | synchronous signal occurs because of action outside your program |
| C. | asynchronous signal occurs because of the action that your program takes |
| D. | division by zero is asynchronous |
| Answer» B. synchronous signal occurs because of action outside your program | |