Following suggestions can help you in learning the science and art of programming:
Writing your programs by hand on a piece of paper may sound like an outdated practice but it is very important especially for beginners. Being able to write a correct program on a paper is more important because our examination system currently allows taking exams on papers, not on computer.
It is equally important to be able to type the program on computer and check if it works. Many skills such as typing, indentation, debugging etc can only be learned by typing your program on computer.
Although you can type your program online by visiting online c compilers using your smartphone, I would advise you not to do so.
Install the recommended software on your own computer.
Practice is the key, which means repeat, many students take pictures of the white board instead of taking notes, this is the modern trend but believe me when I say it will not help you in learning.
Just as writing code is a skill you will learn over time, reading code whether it is written by you or by your teacher is another skill. Many students cannot correctly compile a program because they could not read what the instructor wrote on the whiteboard e.g. when the instructor wrote semicolon ; you for some reason read comma ,
When your program does not compile it will tell you in shape of warning or errors. Try to learn which type of errors are related to what kind of problems. e.g. “11. Statement missing ;” is telling you that you forgot to type a ; near line number 10 or 11.
Few basic but important things to keep in mind:
auto | break | case | char |
---|---|---|---|
const | continue | default | do |
double | else | enum | extern |
float | for | goto | if |
int | long | register | return |
short | signed | sizeof | static |
struct | switch | typedef | union |
unsigned | void | volatile | while |
Keywords added in C99 standard
_Bool _Complex _Imaginary inline restrict
Keywords added in C11 draft standard
_Alignas _Alignof _Atomic _Generic _Noreturn _Static_assert _Thread_local