

MCQOPTIONS
Saved Bookmarks
This section includes 65 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
51. |
Macro calls and function calls work exactly similarly. |
A. | 1 |
B. | |
Answer» C. | |
52. |
Will the following program print the message infinite number of times?
#include
|
A. | Yes |
B. | No |
C. | Yes |
D. | No |
Answer» B. No | |
53. |
Preprocessor directive #undef can be used only on a macro that has been #define earlier |
A. | 1 |
B. | |
Answer» B. | |
54. |
A preprocessor directive is a message from programmer to the preprocessor. |
A. | 1 |
B. | |
Answer» B. | |
55. |
Point out the error in the program
#include
|
A. | Error: unexpected end of file because there is no matching #endif |
B. | The number is odd |
C. | Garbage values |
D. | None of above |
Answer» B. The number is odd | |
56. |
There exists a way to prevent the same file from getting #included twice in the same program. |
A. | 1 |
B. | |
Answer» B. | |
57. |
In a macro call the control is passed to the macro. |
A. | 1 |
B. | |
C. | 1 |
D. | |
Answer» C. 1 | |
58. |
What will be the output of the program?
#include
|
A. | Result = -100.000000 |
B. | Result = -25.000000 |
C. | Result = 0.000000 |
D. | Result = 100.000000 |
Answer» B. Result = -25.000000 | |
59. |
In which stage the following code #include
|
A. | During editing |
B. | During linking |
C. | During execution |
D. | During preprocessing |
Answer» E. | |
60. |
Point out the error in the program
#include
|
A. | 26250.00 7500.00 |
B. | Nothing will print |
C. | Error: Multiple declaration of si |
D. | Garbage values |
Answer» D. Garbage values | |
61. |
If the file to be included doesn't exist, the preprocessor flashes an error message. |
A. | 1 |
B. | |
C. | 1 |
D. | |
Answer» B. | |
62. |
What will be the output of the program?
#include
|
A. | 12, 6, 12 |
B. | 11, 5, 11 |
C. | 11, 5, Garbage |
D. | 12, 6, Garbage |
Answer» B. 11, 5, 11 | |
63. |
Which of the following are correct preprocessor directives in C? 1: #ifdef 2: #if 3: #elif 4: #undef |
A. | 1, 2 |
B. | 4 |
C. | 1, 2, 4 |
D. | 1, 2, 3, 4 |
Answer» E. | |
64. |
Will the program compile successfully?
#include
|
A. | Yes |
B. | No |
C. | Yes |
D. | No |
Answer» C. Yes | |
65. |
What will the SWAP macro in the following program be expanded to on preprocessing? will the code compile?
#include
|
A. | It compiles |
B. | Compiles with an warning |
C. | Not compile |
D. | Compiles and print nothing |
Answer» D. Compiles and print nothing | |