dump -ov <program name>
In the output will be line starting with "Magic =".
If the value is 0x1df, the program is 32bit. If the value is 0x1f7, the program is 64bit.
The dump program can be ran with the -X{32|64} variable. If use X32 and program is 64 bit, you will get an error. Vice-versa if use -X64 and program is 32 bit, you will get error.