Quick actions

cmd+k|ctrl+k

Navigation

Languages

Argument Order Tester

Snippet info

Language

Cpp

Visibility

public

Author

danielmg17

Created

2018-01-24T19:33:44Z

Updated

2018-01-25T16:55:13Z

#include <iostream>
using namespace std;
typedef int m;//just for fun
m y = 0;
int argOrderTest(int);
int main() {
    printf("%d,%d,%d",y,argOrderTest(0),argOrderTest(1));//0,1,-1, OR -1,1,1 //Is it ambiguous like in C or is there a standard?
    return 0;
}
int argOrderTest(int x){
     if(x==0)
        y = 1;
    else
        y = -1;
    return y;
}
INFO