What is the output of the following program?
# include <stdio.h>
void fun(int *a, int *b)
{
int c;
c = a; a = b; b = c;
}
void main ( )
{
int X = 10, Y = 20;
fun (&X, &Y);
printf("%d %d, "X, Y);
}
A
20, 20
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
10, 10
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
10, 20
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
20, 10
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is C 10, 20 <!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
10, 20