The *ONLY* portable way to answer this question such that it is correct for *ALL* ANSI C compilers on *ALL* hardware platforms is as follows:
#include
#include
int main()
{
printf("Number of bits per byte on this machine with this ANSI C compiler = %d\n", CHAR_BIT);
return 0;
}