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); } 9,5 5,9 5,19 19,5 Programming in C programming programming-in-c + – Ankish Gupta 3 asked Mar 9, 2018 edited Mar 9, 2018 by Sukanya Das Ankish Gupta 3 529 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments pankaj_vir commented Mar 9, 2018 reply Follow Share 5 and 9 0 votes 0 votes Ankish Gupta 3 commented Mar 9, 2018 reply Follow Share plz explain ?? 0 votes 0 votes bhanu kumar 1 commented Mar 9, 2018 reply Follow Share Here we use simply " Call by Value method" ,so there is no change in Actual Parameter. so option B : 5,9 is right 0 votes 0 votes Please log in or register to add a comment.
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$ Sukanya Das answered Mar 9, 2018 selected Jan 17, 2019 by Subarna Das Sukanya Das comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer is option(d) Deeksha Sisodiya answered Mar 10, 2018 Deeksha Sisodiya comment Share Follow See all 0 reply Please log in or register to add a comment.