MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following C code? #include <stdio.h> int main() { int n = 58, *ptr = &n; function(&ptr); printf("%d ", *ptr); return 0; } void function(int **ptr) { int k = 12; *ptr = &k; printf("%d ", **ptr); } |
| A. | Undefined behaviour |
| B. | 58 |
| C. | Segmentation fault/code crash |
| D. | 12 12 |
| E. | None of these |
| Answer» E. None of these | |