1. Question:What are the three logical structures in any structured program? 

    Answer
    1. Sequence structure: In the sequence structure, instructions are executed in the order in which they are encounterd.
    2. Loop/Iteration structure: The loop (or iteration) structure provides for the repetition of one or more instructions for as long as a given situation, referred to as a condition, exists.
    3. Selection structure: A condition is tested, and one of two alternative courses of action is selected depending on whether the condition is ture or false.

    1. Report
  2. Question:What are subroutines? 

    Answer
    A group of instructions that performs a limited processing test, such as printing a portion of a report, reading an input record, or calculating a square root.
    subroutine can be classified into two types:

    1. Internal subroutines: An internal subroutine is part of the program that uses it.
    2. External subroutines: External subroutines are used for tasks that more than one program is likely to want performed.

    1. Report
  3. Question:Define modular programming. 

    Answer
    In modular programming, the program is broken down into modules (pieces), each of which performs a single, limited function and is written and debugged separately from other modules.

    1. Report
  4. Question:What do you mean by user? 

    Answer
    The person or group who whome will use the output produced by the computer.

    1. Report
  5. Question:What do you mean by GOTOless programming? 

    Answer
    Programming without the use of branch instruction that is called GOTOless programming.

    1. Report
  6. Question:How many logical structures in any strectured program? 

    Answer
    There are three logical structure in a structure program. they are ______
    1. The sequence structure
    2. The loop structure and
    3. The selection structure

    1. Report
  7. Question:What do you mean by priming read ? 

    Answer
    Priming read means reading the first record in a file prior to entering a loop that is executed until EOF is detected.

    1. Report
  8. Question:Define counter. 

    Answer
    A device for recording the number of times something occurs. In programming, counter technique requires that the number of data records to be read be known in advance.

    1. Report
  9. Question:Write all syntax of the selection structure in psuedocode. 

    Answer
    1. IF condition THEN 
          instruction-T
       END IF
    
    2. IF condition THEN
        instruction-T
       ELSE
        instruction-F
       END IF
    
    3. IF condition-A THEN
         instruction-1
       ELSE IF condition-B THEN 
         instruction-2
       ELSE IF condition-C THEN
         ...
       ELSE 
         instruction-n 
       END IF

    1. Report
  10. Question:Draw the generalized selection structure in flowchart. 

    Answer
    
    Figure: Generalized selection structure

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd