Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int increment(int);
- int value = 0;
- int main() {
- cout << increment(value) << endl;
- return 0;
- }
- int increment(int value) {
- value += 1;
- return value;
- }
- int increment() {
- value += 1;
- return value;
- }
- // Javascript : access and reassignment are viable
- var total = 0
- function call(){
- total++ ;
- return total ;
- }
- console.log(call()) // 1
- # Python : only access is viable
- value = 0
- def inc():
- return "The value is {}".format(value)
- print(inc()) # The value is 0
- void increment(){
- num +=1 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement