For give comment in programming, we can give
“//” for one line. For two or more, we can give “/*” and “*/”.
Why programmer need comment? Because with
comment, programmer can know what coding that he/she had made, so maintenance
is more easily.
For example, we can write this in Windows C++.
Example 1:
#include<stdio.h>
void main(){
printf(“Hello
World”); //show “Hello World” after compile.
getchar();
}
Example 2:
#include<stdio.h>
int main(){
printf(“Hello
World”);
printf(“World”);
return 0;
getchar();
/*
Line 1 : show “Hello World”
Line 2 : show “World”
*/
}
No comments:
Post a Comment