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

Explanation

Correct : a

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science