# hx\_CreateCFile

## Description

Create C file. This command decompiles the selected functions or the whole application. It will ask for the name of the output .c file.

If there is a selected area in the disassembly view, only the selected functions will be decompiled. Otherwise, the whole application will be decompiled.

When the whole application is decompiled, the following rules apply:

* the order of decompilation is determined by the decompiler. It will start with the leaf functions and will proceed in the postnumbering order in the call graph. This order makes sure that when we decompile a function, we will have all information about the called functions. Obviously, for recursive functions some information will be still missing.
* the library (light blue) functions will not be decompiled. By the way, this is a handy feature to exclude functions from the output.
* A decompilation failure will not stop the analysis but the internal errors will. The decompiler generates #error directives for failed functions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/ida-actions/hx_createcfile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
