Structure Program better way in comprehending the program structure possibly will clearer if/when direct implemented in making the simple program.
Source Code:
#include
int main ()
{
cout << "Hello World!";
return 0;
}
Output :
Hello World
[At] panel Source code presented by the the line syntax which develop; build the small program present the word “ Hello World”
As for description from above parts of program structure is :
# include
Line in starting with sign hash (#) is directive [at] preprocessor. This line [is] not line regular code with expression, but this line advise to preprocessor compiler to do include [at] file iostream.h as library to call the functions there are in file iostream.h to be able to be used [at] source code which we wake up.
Int main()
This line deputize early from definition main function. Main function is line where process early starting program executing
Cout <<<< ” Hello World”;
This Line is line statement from C++. Cout present output [at] [screen/sail].
Function cout in declaration [at] file iostream.h hence from that we have to do include ( linking) [at] file iostream [so that/ to be] cout can be recognized by file source code our.
Return 0;
Statement return cause to play function is completed run, return ordinary in following by return code ( in above example [of] return in following by return code 0)
Comment Line
Comment Line have never in paying attention by compiler and compiler will not do the something to comment line.
Comment line is sometime we use to give the information for programmer, as documentation reference.
Line comment example [of] :
//baris komentar
/* komentar lebih
Dari dua baris */
Download PDF File
No comments:
Post a Comment