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