DEV Community

Cover image for 5 Small Things in C That Confused Me at First
Tahami AK SERVICES
Tahami AK SERVICES

Posted on

5 Small Things in C That Confused Me at First

When I started learning C, I thought the basics would be easy.

But honestly, some small things confused me more than big concepts.

Here are a few things that took me time to understand.

1. Why Does Index Start From 0?

Arrays in C start from 0, not 1.

At first, it felt strange.

But later I understood it’s because of how memory works behind the scenes.

Still, in the beginning, I made.... Read More

2. The Semicolon Problem

Missing just one ; can break your whole program.

And the error message doesn’t always point clearly to the problem.

This was frustrating at first, but... Read More

3. Difference Between = and ==

This one caused real confusion.

= → assignment
== → comparison

I remember writing if(a = 5) and wondering why my logic... Read More

4. Why My Loop Was Not Stopping

Sometimes my loops would run forever.

Most of the time, it was because:

I forgot to update the variable
Or wrote the wrong condition

Debugging this helped... Read More

5. Understanding Strings

Strings in C are not like other languages.

They are actually arrays of characters.

And the \0 (null character)... Read More

Final Thoughts

These things may look small, but they can slow you down if you don’t understand them.

If you’re a beginner, don’t worry.

👉 Confusion is part of the learning process.

Just keep practicing, and things will start making sense.

Thanks for reading!

Top comments (0)