Hello,
I've just been learnning on how to use Enumerations as Integers and I'm not sure about somthing.Say I have somthing like this:
enum {FALSE, TRUE} b;
int i;
I answered what I think they are but please tell me if I'm right or not and why.
a)b = FALSE; /*I think this would be 0*/
b)b = i; /* i = 0 now */
c)b++; /*I think this is 1(TRUE)*/
d)i = b; /* i = 1 now */
e) i = 2 * b + 1; /* i = 3 */
I've just been learnning on how to use Enumerations as Integers and I'm not sure about somthing.Say I have somthing like this:
enum {FALSE, TRUE} b;
int i;
I answered what I think they are but please tell me if I'm right or not and why.
a)b = FALSE; /*I think this would be 0*/
b)b = i; /* i = 0 now */
c)b++; /*I think this is 1(TRUE)*/
d)i = b; /* i = 1 now */
e) i = 2 * b + 1; /* i = 3 */