Write a function that returns the number of bits that are “on” (set to 1) in a byte. How can you make this function as fast as possible?
int countBits(unsigned char aByte)
{
{
read responses...
Write a function that returns the number of bits that are “on” (set to 1) in a byte. How can you make this function as fast as possible?
In C++, what is the difference between the access modifiers private and protected?
Write a fast routine for multiplying an unsigned integer by 7. Then write a fast routine for dividing an unsigned integer by 7.
When (and why) should a destructor be declared as virtual?
Write a function that will reverse a string in-place. Assume that the string is null-terminated.