# File Inclusion

ในการ Include จะแบ่งออกเป็น 2 หัวข้อใหญ่ดังนี้

**Header File or Standard files**: จะเรียกไลบรารี่หรือ header file มักจะเป็นเก็บอยู่ในไฟล์ไลบรารี่ของเครื่องเรา โดยไฟล์เหล่านี้จะที่เก็บฟังก์ชันหรือค่าตัวแปรมาใช้ร่วมกับโปรแกรมที่เขียนโดยที่พบเห็นได้ปกติคือ

```c
#include <stdio.h>
```

&#x20;ไฟล์นี้จะเป้นการเรียกไลบรารี่มาทำงานโดยฟังก์ชันที่เราใช้จนอาจลืมที่มาได้เช่น pritf() scanf() หรือการประกาศตัวแปร int float ซึ่งเราใช้กันเป็นพื้นฐานในการเขียนโปรแกรม

&#x20;**user defined files**: ส่วนนี้มักจะเป็น header file ที่นักพัฒนาเขียนมาในการใช้งาน เพื่อลดความซับซ้อนในโปรแกรม และเพื่อให้ง่ายต่อการเรียกใช้ฟังก์ชันหรือตัวแปรซ้ำ ๆ โดยการเรียกใช้ผู้เรียนอาจเคยพบเจอมาบ้างในรูป

```c
#include "filename"
```


---

# 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.aic-eec.com/c-c++-for-embedded-programming/c-programming-techniques/c-c++-preprocessing/file-inclusion.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.
