1. Question:What are run-time errors? 

    Answer
    These are errors that occur while the program is being executed. One common instance wherein run-time errors can happen is when you are trying to divide a number by zero. When run-time errors occur, program execution will pause, showing which program line caused the error.






    1. Report
  2. Question:What are control structures? 

    Answer
    Control structures take charge at which instructions are to be performed in a program. This means that program flow may not necessarily move from one statement to the next one, but rather some alternative portions may need to be pass into or bypassed from, depending on the outcome of the conditional statements.






    1. Report
  3. Question:When is a “switch” statement preferable over an “if” statement? 

    Answer
    The switch statement is best used when dealing with selections based on a single variable or expression. However, switch statements can only evaluate integer and character data types.






    1. Report
  4. Question:What are global variables and how do you declare them? 

    Answer
    Global variables are variables that can be accessed and manipulated anywhere in the program. To make a variable global, place the variable declaration on the upper portion of the program, just after the preprocessor directives section.






    1. Report
  5. Question:What are enumerated types? 

    Answer
    Enumerated types allow the programmer to use more meaningful words as values to a variable. Each item in the enumerated type variable is actually associated with a numeric code. For example, one can create an enumerated type variable named DAYS whose values are Monday, Tuesday… Sunday.






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