Note that the relevant Wikipedia article says (in part) that the "PE format is a data structure that encapsulates the
information necessary for the Windows OS loader to manage the wrapped executable code". I say that because it was posted previously. The Wikipedia article also says "PE is a modified version of the Unix COFF file format". The PE format originally existed for unmanaged software and still is. If the interviewer is interested in your understanding of unmanaged software and you only give an answer for managed software then you will likely not do well. So the following describes what a PE file is and how it is used for unmanaged software. For unmanaged software, PE files are created by a link editor, also called a linker (or linkage editor in the context of IBM Mainframe computers). Unmanaged compilers create object files; one object file for each compiler input file. The link editor combines (links) the contents of the object files into an executable file such as a PE file. For unmanaged software, PE files contain machine code and other data necessary for execution.
PE is a Portable Executable file that contains assembly manifest information.
At a high level, the process of compiling and running a C# program can be illustrated as follows :
1. Compilation - Converting source code in C# language into bytecode in IL (Intermediate Language) using C# compiler.
This step is usually done by the Microsoft C# compiler like the "csc" command line tool, which will actually write the bytecode in a PE (Portable Executable) file.
2. Execution - Converting bytecode in Intermediate Language into native code in machine language on-the-fly (or just-in-time) and executing the native code in a single step.
This step is usually done by the Microsoft CLR (Common Language Runtime), which will be invoked when a PE file with IL bytecode is loaded into the Windows system.
A PE file is a Portable Executable file.
PE is the name given to standard 32 bit Windows executables and defined the structure of the .exe file format. These files contain header information, resource and the raw machine code compiled from an applications souirce code.
Please have a look at the following
The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code