𝟧 𝗦𝗺𝗮𝗹𝗹 𝗧𝗵𝗶𝗻𝗴𝘀 𝗶𝗻 𝗖 𝗧𝗵𝗮𝘁 𝗖𝗼𝗻𝗳𝘂𝘀𝗲𝗱 𝗠𝗲
I thought learning C would be easy.
The small details confused me more than the large concepts.
Here are five things that took time to master:
Indexing starts at 0 Arrays start at 0 instead of 1. This happens because of how memory works. I struggled with this early on.
The semicolon rule One missing semicolon breaks your program. Error messages often fail to show the exact spot. This caused much frustration.
Assignment vs. Equality I often mixed up = and ==. The single = symbol assigns a value. The double == symbol checks for equality. I once wrote if(a = 5) and broke my logic.
Infinite loops My loops ran forever sometimes. I usually forgot to update the loop variable. Debugging these mistakes taught me patience.
How strings work Strings in C are not special types. They are arrays of characters. You must remember the null character at the end.
These details slow you down if you ignore them.
Do not worry if you feel lost. Confusion is part of learning.
Keep practicing. Things will make sense.
Source: https://dev.to/tahami_akservices_cb075e/5-small-things-in-c-that-confused-me-at-first-3m3o
Optional learning community: https://t.me/GyaanSetuAi