No, indentation should come first as you write. It's meant to make the code easier to read, and hence easier to debug, maintain, etc.
boolean isn't a datatype in C, so unless you define it yourself, or it's defined in some library, you can't use it.
Here's an indented -- and slightly altered -- version of your program:
Code:
#include <stdio.h>
typedef struct hello
{
int x;
}hello;
typedef struct hey
{
union p
{
int l;
struct hello *ptr;
}types;
int l;
}hey;
int main(void)
{
return 0;
}
Much easier to read, isn't it?