取反!和按位取反~的区别

按位取反“~”: 按位取反1变0,0变1

逻辑 非“!”: 逻辑取反, false变true,true变false, 在C中,只要不是0就是真

原文地址:https://www.cnblogs.com/dapaitou2006/p/6626979.html