int main()
{
int i=10;
unsigned char c=10,bc=0;
int TakingOut=1,msg=0;
bc=c--;
do {
msg=!TakingOut;
}while ((!msg)%26amp;%26amp;c%26lt;bc%26amp;%26amp;(bc=c--));
printf("The minimum size of unsigned char is %u.\n\n",bc);
system("PAUSE"); return 0;
}
Is this a rigorous enough way to find the minimum size of an unsigned char?
What do you mean by the minimum size of an unsigned char?
Char is by default in most architectures (if not all modern ones) is 1 byte long.
Also, you can find the size of any type by using the sizeof operator.
sizeof(int) == 4 for example.
If you mean the range of unsigned char, then it should be 0 - 255 for unsigned char.
Reply:No, I'm afraid that it isn't.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment