Featured Posts

Sequence Control with in Statements

Basic statements :-> There are statements that apply operations to data objects.  For example argument operations, subprogram calls, input output statements and considered as a unit of a step.

Statements level sequence control :->
  • Composition :-> Statement may be placed in a textual sequence and executed in order.
  • Alteration :-> Two sequence form alternative and either of them will be executed.
  • Iteration :-> A sequence of statement executed repeatedly zero or more times depends upon the condition provided.
# Explicit Sequence Control :->
         The transfer of control is most often indicated by use of a goto statements to an explicit statement with a given label name.
Two forms of goto statements are often present in many languages :-
Unconditional goto :-> Within a sequence of statements, an unconditional goto such as
    goto NEXT
transfers control to the statements labeled NEXT.  The statement following the goto is not executed as part of the sequence.

Conditional goto :  Within a sequence of statements, a conditional goto such as if  A = 0 then, goto NEXT transfers control to the statement labeled NEXT only if the specified condition holds.
# A goto statements leads to the unstructured design of program.

# Advantages of goto statements :->
  • Direct hardware support for efficient execution.
  • Simple and easy to use and easy understanding for low level programmers
  • May simulate any control structure.
# Disadvantages of goto statements :->
  • Leads to unstructured programming.
  • Super flow any program with goto can be translated in to another one without goto.
  • Undefined control with nested structure.

            A break statements is a form structure explicit control.  Usually the break causes control to move forward in the program to an explicit point at the end of a given control structure.  Thus break, causes control to exit the immediately enclosing.
Continue :-> It causes control to move forward to the end of the current loop body.
Thus, a break will exit a loop, whereas the continue will iterate the loop again.

# Structured Programming Design :->

It is more important that a program run correctly than more efficient.
  1. A program that contains no GOTO's.
  2. Hierarchical design of program structures using only the simple control forms of composition, alternation, and iteration.
  3. Representation of the hierarchical design directly in the program text, using the "structured" control statements.
  4. Program text in which the textual sequence of statements corresponds to the execution sequence.
# It is easy to write a program with the help of GOTO statement but that will lead to irregular sequence so it difficult to understand.  A code with irregular execution sequence is known as spaghetti code.

Storage Management in Programming Language
Programming Languages Concepts 
Subprogram Sequence Control in Programming language. 
Structured Sequence Control in Programmig language 
Sequence Control with in Statements 
Implicit and Explicit sequence Control 
Difference between C language and C++ language.
  1. Java threads and Interrupts in Java programming language
  2. Abstract classes and Generic function in Java
  3. Callback functions in Java Programming language
  4. Constructors in programming language
  5. Static components and constants concept in programming language
  6. Data encapsulation in programming language.
  7. Java threads and Interrupts in Java programming language

Post a Comment


www.posthatke.com. Powered by Blogger.
Copyright © www.posthatke.com | Blogger Templates | Designed By posthatke.com