t(0 == count_word_number(NULL));
assert(0 == count_word_number(""));
assert(1 == count_word_number("hello"));
assert(3 == count_word_number("china baby hello"));
}
void test()
{
assert(0 == count_word_number(NULL));
assert(0 == count_word_number(""));
assert(1 == count_word_number("hello"));
assert(3 == count_word_number("china baby hello"));
}
总结:
1)状态机是编程人员的基本功,它和另外一种方法回调函数注册一样,使我们在日常开发中经常用到的一种方法
2)状态机是计算机网络通信的重要内容,想要对tcp-ip协议栈加深了解的朋友尤其需要重点掌握