How does return work here?

前端 未结 5 593
野性不改
野性不改 2021-01-27 06:25

new question: but why the expression from n == number, from firstFactorPtr == factor1 ?

Can somebody explain me, how this works:

return ( factor ==

5条回答
  •  无人共我
    2021-01-27 06:52

    In a nutshell:

     return foo == bar;
    

    is equivalent to

     return foo == bar ? 1 : 0;
    

    since relational operators like == yield either 0 or 1. Does that make it clear?

提交回复
热议问题