change language in blog

Saturday, November 19, 2011

language c part 2

/ / Day of the fourthCode Structure Analysis
OK, yesterday we had to write source code that displays the word hello
/ / Hello world application
# Include <iostream>
using namespace std;

int main ()
{
court <<"hello world \ n";
system ("pause");
return 0;
}
from there we will explain partially,1. / / Hello world applicationsign / /a sign which means that code comments are ignored when the compiler or interpreter terjadi.Jadi sign it will not be processed by the memory. In addition there is a sign that sign again, the / * comment * /differences of these markers is that if the sign / / only affects the first rowwhile the sign of / * ... * / Effect of (/ *) to which we put the last mark (* /)
2. include <iostream>This line is used to attach the header file iostream when the program is compiled.
3. using namespace std;This line serves to tell the compiler that the program we have written using C + + standard library.
4. int main ()int is a variable that is used for integers, but if combined int main () then he will be a function. Main () is the obligation of a program, because without this function the application that you create will be errors, so we must enter the function this.
5. {}you need to know, that among the signs {and} we write the variables, and other functions, according to which you are in a source program.
6. court <<"hello world \ n";
court <<"hello world \ n";court is a combination of C + out,accordance with the first meeting that nearly variables in C + + starting with Ccourt <<is a function to display the results (output).
"" Serves to create a char or string.\ N has the same function with the enter key when writing the document.
7. system ("pause");system ("pause"); has a function to terminate the process, until the user presses any key on the keyboard.
8. return 0;us out of the program, after we do or pressing buttons at random. This function is a combination of dati function system ("pause");

God willing, see again
source by me

No comments:

Post a Comment

Total Pageviews