Define Structure of a Program


Structure of a Program

structure of programming language, structure of program in c language, structure of program in c++, structure of programmable logic array, structure of program in java, structure of program in arduino, structure of programming languages pdf, structure of programming languages course syllabus, structure of programme development in curriculum, structure of programme, structure of program, structure of program in python, structure of program management, structure of program in prolog, structure program of employee in c, structure of c program with example, structure of a program, structure of a program in c++, structure of abap program, structure of arduino program, structure of a program in c language, structure of awk program, structure of assembly program, structure of application program, structure of abap program in sap, structure of android program, a structure program in c, a structure program, structure of a programming language, write a structure of c program, structure of a programme, structure of a program in java, structure of a program in assembly language, structure of a program using c++, structure of a program management office, structure of basic program, structure of visual basic program, data structure program of bubble sort, structure based program in c, structure building program, structure basic program in c, structure bonus program, structure of c program in brief, structure of basic java program, basic structure of c program with example, structure of program code, structure of c program pdf, structure of cobol program, structure of c program ppt, structure of c program notes, structure of c++ program wikipedia, structure of c++ program with diagram, structure of c program with explanation, structure of cpp program, c structure programs, c structure programs pdf, structure c programming array, structure c programme, structure c programming language, structure c programming tutorial, structure of c program with example pdf, structure of c program wikipedia, structure of delphi program, structure of c program diagram, structure of c program documentation section, structure program do not include, structure program download, structure program definition, structure program design, structure program do not include mcq, structure of device driver program, structure of cobol db2 program, structured programming, structure of embedded program, structure of exe program, structure of c program example, structure of c program explain it, structure of a java program example, internal structure of exe program, structured exercise program, structure of fortran program, structure of c program for pic18, structure of computer program for fem analysis, structure program for student details in c, structure program for student details, structure program for employee details in c, structure program for employee, structure program for c, structure program for genetics, structure program for library, structure of go program, structure program genetics, organizational structure of guidance program, structure of a good program, simple structure of guidance program, general structure of program, give the structure of program status word in 8085, explain structure of a good program, program structure of a game, general structure of opengl program, structure of html program, structure of html program pdf, basic structure of html program, general structure of html program, structure of a haskell program, define structure of html program, structure harvester program, structure of c program in hindi, explain the structure of html program with suitable example, give the structure of html program, structure of internship program, structure of cobol program in pdf, structure of c program in detail, structure of java program, structure of java program pdf, structure of javascript program, structure of java program ppt, structure of java program wikipedia, structure of java program with an example, structure of jsp program, structure of j2me program, structure of java program notes, basic structure of java program, structure of k-12 program, structure of lex program, structure of lex program with example, structure of loyalty program, structure of learning program, structure of c program language, structure program language, structure of assembly language program, basic structure of lex program, explain structure of lex program, data structure program of linked list, structure of matlab program, structure of mentorship program, structure of mfc program, structure of mapreduce program, structure of mpi program, structure of medicare program, structure of masm program, structure of modular program, structure of .net program, structure of a news program, structure of c#.net program, structure of asp.net program, structure of dot net program, program of nested structure in c, structure of opengl program, structure of oop program, basic structure of opengl program, structure of object oriented program, structure oriented program, program structure of objective c, general structure of an opengl program, structure of one html program, structure of c++ program using class and object, structure of python program, structure of php program, structure of prolog program, structure of prolog program with example, structure of pascal program, structure of plc program, structure of perl program, structure of qbasic program, data structure program of queue, program of queue using structure, structure of ruby program, structure of land reform program, structure of agrarian reform program, structure-refinement program for disordered carbons, structure related program in c, program structure of r code, different structure of agrarian reform program, structure of sas program, structure of servlet program, structure of sqr program, structure of pl/sql program, structure of c sharp program, data structure program of stack, structure of a simple program, structure of a swift program, structure of a scala program, structure of head start program, structure of training program, structure of the program, structure of tsr program, structure of tv program, structure of the program in c++, structure of java program tutorial, structure program tutorial, structure of pnp training program, general structure of the program, structure analysis program tutorial, structure of c++ program using class, structure program using function in c, structure program using pointer, structure program using array in c, structure program using function, program of structure using array, structure of vb program, structure of vhdl program, structure of verilog program, structure of vc++ program, structure of volunteer program, structure of vrml program, structure of a vba program, basic structure of vb program, basic structure of vhdl program, structure visualization program, structure of window program, structure of wml program, structure of wedding program, structure of xml program, basic structure of xml program, structure of yacc program, structure of c program youtube, structure your program plan and write it down, structure of pl 1 program, 1) explain about structure of c program with example, 3d structure of protein program, 3 structures of programming, 3 basic structures of programming, 3 types of program structure, 3 types of structure design in programming, structure of abap/4 program, typical structure of abap 4 program, 6) explain the structure of a java program, program structure of 8086, structure of program status word in 8085, program memory structure of 8051 microcontroller, structure of fortran 90 program

Probably the best way to start learning a programming language is by writing a program. Therefore, here is our first program:

Best C++ Books


Input
// my first program in C++
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
Output
 Hello World!
The first panel shows the source code for our first program. The second one shows the result of the program once compiled and executed. The way to edit and compile a program depends on the compiler you are using. Depending on whether it has a Development Interface or not and on its version. Consult the compilers section and the manual or help included with your compiler if you have doubts on how to compile a C++ console program.
// my first program in C++
This is a comment line. All lines beginning with two slash signs (//) are considered comments and do not have any effect on the behavior of the program. The programmer can use them to include short explanations or observations within the source code itself. In this case, the line is a brief description of what our program is.
using namespace std;
All the elements of the standard C++ library are declared within what is called a namespace, the namespace with the name std. So in order to access its functionality, we declare with this expression that we will be using these entities. This line is very frequent in C++ programs that use the standard library, and in fact, it will be included in most of the source codes included in these tutorials.
int main ()
This line corresponds to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether there are other functions with other names defined before or after it - the instructions contained within this function's definition will always be the first ones to be executed in any C++ program. For that same reason, it is essential that all C++ programs have a main function.

The word main is followed in the code by a pair of parentheses (()). That is because it is a function declaration: In C++, what differentiates a function declaration from other types of expressions are these parentheses that follow its name. Optionally, these parentheses may enclose a list of parameters within them.

Right after these parentheses, we can find the body of the main function enclosed in braces ({}). What is contained within these braces is what the function does when it is executed.

cout << "Hello World!";
This line is a C++ statement. A statement is a simple or compound expression that can actually produce some effect. In fact, this statement performs the only action that generates a visible effect in our first program. out represents the standard output stream in C++, and the meaning of the entire statement is to insert a sequence of characters (in this case the Hello World sequence of characters) into the standard output stream (which usually is the screen). the cout is declared in the stream standard file within the std namespace, so that's why we needed to include that specific file and to declare that we were going to use this specific namespace earlier in our code.

Notice that the statement ends with a semicolon character (;). This character is used to mark the end of the statement and in fact, it must be included at the end of all expression statements in all C++ programs (one of the most common syntax errors is indeed to forget to include some semicolon after a statement).

return 0;
The return statement causes the main function to finish. the return may be followed by a return code (in our example is followed by the return code 0). A return code of 0 for the main function is generally interpreted as the program worked as expected without any errors during its execution. This is the most usual way to end a C++ console program.

Please note before commenting on this page.
1. Don't comment as for advertisement purpose.
2. Don't hyperlink your website inside comment box.
3. Abuses are strictly prohibited.
4. If necessary, you can post the only URL without any text hyperlink.
EmoticonEmoticon