edited by
529 views
0 votes
0 votes
swap(int c, int d)
{
    int k,t;
    k=3;
    t=c;
    c=d;
    d=t;
    k=c+d+t;
}
main()
{
    int k=5, l=9;
    swap(k,l);
    printf("%d,%d",k,l);
}
  1. 9,5
  2. 5,9
  3. 5,19
  4. 19,5
edited by

2 Answers

Best answer
3 votes
3 votes
$printf$ will print the value which the $swap$ function returns

& we can clearly see that the $swap$ function didn't return anything

So, $printf$ will print the argument of $swap$ i.e. $k=5$, $l=9$
selected by
Answer:

Related questions

2 votes
2 votes
0 answers
2
0 votes
0 votes
2 answers
4
sh!va asked Mar 2, 2017
1,366 views
The library function exit ( ) causes as exit from (a) the loop in which it occurs(b) the block is which it occurs(c) the functions in which it occurs(d) the progam in whi...