Syntax

C Include a Header Syntax

In C, include a header: includes a standard library header — #include <stdio.h>

Quick Answer

Syntax
#include <stdio.h>
CSyntax

Include a Header

Code example
#include <stdio.h>

Includes a standard library header.

Learn More

How to include a header in C

  1. Open your C file or editor.
  2. Copy the example, then replace its sample names and values for your code.

C Include a Header Syntax

Use #include <stdio.h>.

Related Syntax References

Frequently asked questions

What is the C syntax for include a header?

Use this pattern: #include <stdio.h>

Can I copy this C code example?

Yes. Use Copy code and adapt the example to your program.

Is this C syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify