ECE DEPARTMENT : NOTICE BOARD

ADVISORY TO STUDENTS (Answer to "Sir, College is there today ?")

Quote :
"If egg is broken by outside force, life ends. If broken by inside force, life begins. Great things always begin from inside force, trust yourself."

Batchwise blogs: -2008 | 2009 | 2010 | 2011 | 2012

Internal Marks Sem-II : | 2011 | 2010 | 2009 |

Intro | Case 1 | Case 2 | Case 3 | Case 4 | Case 5 |

Previous Posts

Monday, July 05, 2010

Today's C Program























Bye & Take care

2 comments:

  1. Ans:5 5 5 5

    Exp:

    The above program uses the concept of function pointer.P[0] & P[1] are nothing but function pointer.

    When we say P[0](&a,b) , P[1](&a,b).It is same as f1(&a,b) ,f2(&a,b) respectively.

    In this program the function f1(),f2() are using the concept called call by reference and call by value.The first parameter to both the functions is call by reference and second parameter is call by value.

    So in functions f1() and f2(),we are trying to swap the contents.But we are passing address of the variable a only.So,changes made in the calling function will be reflected to the called function.But it won't happen with b,as it is call by value.

    Hence the output.

    ReplyDelete