eolas/zk/Printing_values_in_C.md
2024-10-18 19:00:03 +01:00

25 lines
347 B
Markdown

---
id: 3hcv0amc
tags:
- C
created: Thursday, February 29, 2024 | 17:33
---
# Printing values in C
## To print a literal
```c
printf("hello world")
```
## To print a variable
```c
int age = 25
print("%d", age)
```
The `%d` is an example of a [format specifier](./zk/format-specifiers-in-c.md).
It is the decimal integer format specifier.