8 replies

"A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. For that purpose, C++ provides control structures that serve to specify what has to be done by our program, when and under which circumstances. With the introduction of control structures we are going to have to introduce a new concept: the compound-statement or block. A block is a group of statements which are separated by semicolons (;) like all C++ statements, but grouped together in a block enclosed in braces: { }: { statement1; statement2; statement3; } Most of the control structures that we will see in this section require a generic statement as part of its syntax. A statement can be either a simple statement (a simple instruction ending with a semicolon) or a compound statement (several instructions grouped in a block), like the one just described. In the case that we want the statement to be a simple statement, we do not need to enclose it in braces ({}). But in the case that we want the statement to be a compound statement it must be enclosed between braces ({}), forming a block. Source: http://in.docsity.com/en-docs/Algorithms_and_Application_Programming__Lecture_notes__KUMAR"

Simply the particular control composition is actually thetype regarding protocol. This structure can berepetition, series or option. Eachof these types of is necessary for the various purposewithin a program. Electronic.G. some sort of repeating perchance accustomed to re-start the actual string associated with codein the actual formula till in addition to celebration happens`
to see other 6 answers
Related documents
Search questions by subject
