C++ Comparison, What is the outcome? -


there simple code

int a( int *p0 ) {         int p;         if( p0 ) return p0 > &p;         return a(&p); }  int main() {         puts( a(0) ? "y" : "n" ); } 

what result , how many times method a called?

comparing pointers using > unspecified if not part of same array.

so there no actual answer, although can assume if stack grows down if( p0 ) return p0 > &p; true, otherwise false.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -