Computer Sciences > Gate 2015 Set-1 > C Code
The output of the following C program is __________.
void f1 (int a, int b)
{
int c;
c=a; a=b; b=c;
}
void f2 (int *a, int *b)
{
int c;
c=*a; *a=*b;*b=c;
}
int main()
{
int a=4, b=5, c=6;
f1(a, b);
f2(&b, &c);
printf (β%dβ, c-a-b);
return 0;
}
{
int c;
c=a; a=b; b=c;
}
void f2 (int *a, int *b)
{
int c;
c=*a; *a=*b;*b=c;
}
int main()
{
int a=4, b=5, c=6;
f1(a, b);
f2(&b, &c);
printf (β%dβ, c-a-b);
return 0;
}
Correct : a
Similar Questions
The value printed by the following program is____________
void f(int* p, int m)
{
m = m + 5;
*p = *p + m;
return;
}...
The value printed by the following program is____________
void f(int* p, int m)
{
m = m + 5;
*p = *p + m;
return;
}...
The value printed by the following program is____________
void f(int* p, int m)
{
m = m + 5;
*p = *p + m;
return;
}...
Total Unique Visitors
Loading......