-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = 12;
int *const ptr = &n;
function(&ptr);
printf("%d\n", *ptr);
}
void function(int **ptr)
{
int k = 15;
*ptr = &k;
printf("%d\n", **ptr);
}
-
- 12
- Compilation Error
- 15
15 - Garbage value
- None of these
Correct Option: C
15
15