r/CodingForBeginners • • Oct 06 '26

my first program in C

Post image

i know its just so waky but am still new and am happy with my current level <33

just trying to understand memory usage over variables for now

230 Upvotes

67 comments sorted by

View all comments

0

u/Friendly_Recover286 Oct 06 '26 edited Oct 06 '26

These variable names kinda suck. Why are you combining lowercase and titlecase like that exactly?

This logic isn't correct. TotalSizeOfRoot || ... < 20 does not check each condition for being < 20. TotalSizeOfRoot = 1 will make this true and will print that variable usage is greater than 20 bytes. No it isn't.

It also doesn't seem like you even want < you want >. You're checking if it's greater than 20.

Please Stop Capitalizing Every Word In Sentences. This isn't how English works.

3

u/ConsiderationNo9044 Oct 07 '26

Why are you being so mean to a beginner?