Computer Sciences > Gate 2016 Set-1 > Pointer
Consider the following C program

#include<stdio.h>.
void mystery(int *ptra, int *ptrb)
{
    int *temp;
    temp = ptrb;
    ptrb = ptra;
    ptra = temp;
}
int main()
{
    int a=2016, b=0, c=4, d=42;
    mystery(&a, &b);
    if (a < c)
        mystery(&c, &a);
    mystery(&a, &d);
    printf("%dn", a);
}


The output of the program _____________

Correct : a

Similar Questions

Consider the C code fragment given below. typedef struct node { &nbsp; &nbsp; int data; &nbsp; &nbsp; node* next ; } node; void join(node* m, node* n) { &nbsp;...
#201 MCQ
Consider the C code fragment given below. typedef struct node { &nbsp; &nbsp; int data; &nbsp; &nbsp; node* next ; } node; void join(node* m, node* n) { &nbsp;...
#202 MCQ
Consider the following C code: #include&lt;stdio.h&gt; int * assignval (int *x, int val) { &nbsp; &nbsp; *x = val; &nbsp; &nbsp; return x; } int main()...
#204 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......