Write any code in c language you must have
two basic things:
1. Knowledge of syntax of c language.
2. Logic
To learn syntax of c
language is very easy task. For a good programmer you must have own logic
"how to do any task". C language is only used to convert you logic in
text. This site is only helpful for to teach you syntax of c language that is easy
part of any programming language also basic logic or approach how to write a c
code. Most important point is logic of any code doesn’t come under c language. Now
I am going to tell about c language.
1. Every c program start
from main and ends with any null statement.
2. We can write preprocessor
code in the c language to make it less platform dependent.
Basic syntax of c language
is:
a. Include the header file
which contains predefined function, data type etc.
b. One and only one main
function
c. Any other function
All above three statements are optional.
Example of simple c program:
#include<stdio.h> //header file
int main(){
printf("My first
c program"); //to print any message.
return 0;
}
2 comments:
thanks
thnksss
Post a Comment