DEV Community

Learn C with me! C in one blog

Tawhid on February 26, 2022

C is being there for years now but for beginners C is very hard to learn.I already use C and bash on a daily basis because I use linux as daily dri...
Collapse
 
pauljlucas profile image
Paul J. Lucas

You also return from main(), but then mention exit() status codes — and never define exit() nor mention that you need to #include <stdlib.h> to use it, nor mention that return and exit() from main() are equivalent. Your status codes are also Microsoft-specific. Indeed, status codes are not defined by the C standard with the exception of 0 or non-0.

You explain what pointers are but not why anybody would need to use them. Why would you need to have the address of another variable?

Some of your printf() examples don't include the \n at the end.

Collapse
 
dumboprogrammer profile image
Tawhid

Thank you so much man for pointing out the mistakes.
I really appreciate it.
Thanks to you I was able to make it better.

Collapse
 
pauljlucas profile image
Paul J. Lucas

C is the mother of all languages ...

No, FORTRAN is.

First character should be an underscore or a letter

No, first character must be a letter; an underscore counts as a letter. "Should" means "is a good idea, but not required."

It would also really help if you used the correct markdown for your code blocks so indentation happens properly. Use 3 back-ticks on a line by themselves to surround your code blocks. Your code examples are hard to read.

Your example for the ?: operator is not how it's typically used.

It's not clear what the point of your article is since there are many good introductions to C (with good formatting) that already exist. What does yours bring to the table?

Collapse
 
dumboprogrammer profile image
Tawhid

Thanks for pointing out, I have fixed them