Advertisement
abhav

Untitled

Jul 22nd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #‎include‬ <iostream>
  2. using namespace std;
  3.  
  4. int fun(int a, int b = 1, int c =2)
  5. {
  6. return (a + b + c);
  7. }
  8.  
  9. int main()
  10. {
  11. cout << fun(12,1 ,2);
  12. return 0;
  13. }
  14. output based on value passed in cout << fun(12,1 ,2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement