---
title: "Comment by Loïc De Deyn on \"In-Depth Analysis: Post-Increment vs Pre-Increment  Operators\" | Hashnode"
description: "Hi Patrick, In the pre-increment operation explanation, you made a little typo. #include &lt;stdio.h&gt; int main() { int x, y; x = 5 ; y = ++x; printf( \"x is e"
url: "https://hashnode.com/posts/in-depth-analysis-post-increment-vs-pre-increment-operators/64a2cb558b8bf42aaf3954f5/comment/66fa77e826279c70c7fdd87e"
---

[Discussion](https://hashnode.com/posts/in-depth-analysis-post-increment-vs-pre-increment-operators/64a2cb558b8bf42aaf3954f5)

Comment [In-Depth Analysis: Post-Increment vs Pre-Increment Operators](https://hashnode.com/posts/in-depth-analysis-post-increment-vs-pre-increment-operators/64a2cb558b8bf42aaf3954f5)

[Loïc De Deyn](https://hashnode.com/@Loddaa)

[Sep 30, 2024](https://hashnode.com/posts/in-depth-analysis-post-increment-vs-pre-increment-operators/64a2cb558b8bf42aaf3954f5/comment/66fa77e826279c70c7fdd87e)

Hi Patrick,

In the pre-increment operation explanation, you made a little typo.

```
#include <stdio.h>
int main()
{
    int x, y;
    x = 5;
    y = ++x;

    printf("x is equal to %d\n", x); // x is equal to 6
    printf("y is equal to %d\n", y); // y is equal to 5 ⚠️ Should be 6 instead.
}
```

Correct me if I'm wrong.

Thanks for your article by the way!

[Patrick Okafor](https://hashnode.com/@writesByPatrick)

[Oct 6, 2024](https://hashnode.com/posts/in-depth-analysis-post-increment-vs-pre-increment-operators/64a2cb558b8bf42aaf3954f5/comment/66fa77e826279c70c7fdd87e#reply-6701f4048d2613917a0f48e7)

Hahaha you're correct, thanks for pointing that out. It seems that no matter how much you cross-check an article before posting, there are always some silly mistakes somewhere.
