MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following cannot be a variable name in C? |
| A. | volatile |
| B. | true |
| C. | friend |
| D. | export |
| Answer» B. true | |
| 2. |
What is the problem in the following variable declaration? |
| A. | The variable name begins with an integer |
| B. | The special character ‘-‘ |
| C. | The special character ‘?’ |
| D. | All of the mentionedView Answer |
| Answer» E. | |
| 3. |
What will happen if the following C code is executed? |
| A. | It will cause a compile-time error |
| B. | It will cause a run-time error |
| C. | It will run without any error and prints 3 |
| D. | It will experience infinite loopingView Answer |
| Answer» D. It will experience infinite loopingView Answer | |
| 4. |
Which of the following is not a valid variable name declaration? |
| A. | float PI = 3.14; |
| B. | double PI = 3.14; |
| C. | int PI = 3.14; |
| D. | #define PI 3.14 |
| Answer» E. | |
| 5. |
Which is valid C expression? |
| A. | int my_num = 100,000; |
| B. | int my_num = 100000; |
| C. | int my num = 1000; |
| D. | int $my_num = 10000; |
| Answer» C. int my num = 1000; | |