Hi, suppose you have the following structure:
#include <windows.h> // BOOL is here.
#include <stdio.h>
typedef struct {
BOOL someBool;
char someCharArray[100];
int someIntValue;
BOOL moreBools, anotherOne, yetAgain;
char someOthercharArray[23];
int otherInt;
} Test;
int main(void) {
printf("Structure size: %d, BOOL size: %d.\n", sizeof(Test), sizeof(BOOL));
}
When I compile this piece of code in my machine (32-bit OS) the output is the following:
Structure size: 148, BOOL size: 4.
I would like to know if, once compiled, these values may change depending on the machine which runs the program. E.g.: if I ran this program in a 64-bit machine, would the output be the same? Or once it's compiled it'll always be the same?
Thank you very much, and forgive me if the answer to this question is obvious...