说我有以下数据: name is_married has_dog wants_children
Tom 1 1 1
Dick 0 1 1
Harry 0 0 0
但我希望得到以下数据: name description
Tom is_married
Tom has_dog
Tom wants_children
Dick has_dog
Dic
我的任务是编写一个或多个C语句,清除变量“x”的位11和12(而不会干扰其他位使用位)级C运营商。我的教授说:“下面声明的变量”掩码“可能会有所帮助。” int mask = 0x00001800;
int x = arbitrary_value;
我应该使用移位操作结合位级操作吗?我有点不清楚如何做到这一点。