Is there a built in swap function in C?

前端 未结 11 2152
北恋
北恋 2020-12-15 16:01

Is there any built in swap function in C which works without using a third variable?

11条回答
  •  [愿得一人]
    2020-12-15 16:17

    There is no such function in standard C.

    (In C++ you have std::swap().)


    Maybe a macro from this question can be useful for you.

提交回复
热议问题