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;
}

Correct : a

Similar Questions

Consider the following program in C language: #include <stdio.h> main() {     int i;     int *pi = &i;     scanf("%d",...
#16 MCQ
Consider the following two C code segments. Y and X are one and two dimensional arrays of size n and n × n respectively, where 2 ≤ n ≤ 10. Assume that in both c...
#25 MCQ
Consider the following C program segment. #include<stdio.h> int main( ) {     char s1[7] = "1234", *p;     p = s1 + 2;    ...
#37 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......