Casting boolean to int

Hi

boolean values (in C anyway) are just stored as 1 for true and 0 for false

You can see this by trying:

if(1)//means if true, i.e will always execute
{
//some code
}

or
while(1) //infinite loop
{
//infinite loop here
}

My guess is if you cast one to an int you would just get 1 or 0