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. |
Comment on the output of the following C code. |
| A. | You cannot apply any arithmetic operand to a pointer |
| B. | We don’t have address of an address operator |
| C. | We have address of an address operator |
| D. | None of the mentionedView Answer |
| Answer» C. We have address of an address operator | |
| 2. |
What substitution should be made to //-Ref such that ptr1 points to variable c in the following C code? |
| A. | *sptr = &c; |
| B. | **sptr = &c; |
| C. | *ptr1 = &c; |
| D. | none of the mentionedView Answer |
| Answer» B. **sptr = &c; | |
| 3. |
You cannot apply any arithmetic operand to a pointer |
| A. | We don’t have address of an address operator |
| B. | We have address of an address operator |
| C. | None of the mentioned |
| Answer» B. We have address of an address operator | |
| 4. |
Which of the following declaration will result in run-time error? |
| A. | int **c = &c; |
| B. | int **c = &*c; |
| C. | int **c = **c; |
| D. | none of the mentioned |
| Answer» E. | |
| 5. |
*sptr = &c; |
| A. | **sptr = &c; |
| B. | *ptr1 = &c; |
| C. | none of the mentioned |
| Answer» B. *ptr1 = &c; | |