SHARE
TWEET

Untitled

a guest Aug 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int increment(int);
  2. int num = 0;
  3.  
  4. int main() {
  5.     cout << increment(num) << endl;
  6.     return 0;
  7. }
  8.  
  9. int increment(int value) {
  10.     value += 1;
  11.     return value;
  12. }
  13.      
  14. int increment() {
  15.     value += 1;
  16.     return value;
  17. }
  18.      
  19. // Javascript : access and reassignment are viable
  20. var total = 0
  21.  
  22. function call(){
  23.   total++ ;
  24.   return total ;
  25. }
  26.  
  27. console.log(call()) // 1
  28.      
  29. # Python : only access is viable
  30.  
  31. value  = 0
  32.  
  33. def inc():
  34.     return "The value is {}".format(value)
  35.  
  36. print(inc()) # The value is 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top