Programming

Things to Remember While Programming in C

Here mostly we are talking about C Programming but as you know C programming is the foundation of any programming language. There are a few things to learn before you start.

Before you start the coding you just have to remember these things in C.

C has widely-used programming language because C is the base for all other programming languages, if you know the C programming then it will help you in most of the other programming like PHP, Python, Java and others.

  • Do not forget to use pre-processor at the beginning of the program.
  • Do not forget to use a library function.
  • The program must have the main function with a return type or not return type.
  • The program must have the block for defining the variables and writing code.
  • C is case sensitive programming language so you do have to care about the variables, keywords and cases.
  • Most of the time we use lower case for writing the codes in C, If you are using any other cases, you must have to remember.
  • Statement ends with semicolon otherwise that will return a syntax error.
  • Use indentation for better understanding the code and to make more readable and user-friendly.

C Code [Right and Better to Understand]

This is the best way to make C code better understandable and more readable, any user and another programmer can understand the code easily.

#include<stdio.h>
        int main()
        {
                printf("Hello Worldn");
                return 0;
        }

C Code [Right but Not Better to Understand the Code]

You can write your C code like this way also but you need to make your code readable and understandable, you have to work hard to understand this code.

#include<stdio.h>
int main(){printf("Hello Worldn");return 0;}

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.