Trivia Quiz On Fundamentals Of Programming!

28 Questions | Total Attempts: 1272

SettingsSettingsSettings
Please wait...
Programming Quizzes & Trivia

Programming is the art and science of translating an algorithm and encoding it into a script by a programmer. There are two types of programming high level and low level. Algorithms are the crucial part of any programming which find a solution to the problem. This quiz has been designed to test your knowledge about the basics of programming. So, lets' try out the quiz. All the best!


Questions and Answers
  • 1. 
    Which of the following is NOT a type of algorithm?
    • A. 

      Program

    • B. 

      Flowchart

    • C. 

      Decision Table

    • D. 

      Pseudocode

  • 2. 
    The symbol that represents comments in a flowchart is
    • A. 

      A procedure symbol

    • B. 

      An annotation symbol

    • C. 

      A flow line

    • D. 

      A subroutine

  • 3. 
    The part of a decision table in which all the conditions, based on which a decision is made, are wtitten is:
    • A. 

      Condition Applied

    • B. 

      Condition Stub

    • C. 

      Action Taken

    • D. 

      Action Stub

  • 4. 
    In a flowchart the symbol that represents a condition based on which a decision should be made is
    • A. 

      Procedure

    • B. 

      Annonation

    • C. 

      Decision

    • D. 

      Subroutine

    • E. 

      Process

  • 5. 
    Which symbol on a flowchart is used to represent the connect between the portions of a flowchart on separate pages?
    • A. 

      Off Page Connector

    • B. 

      On Page Connector

    • C. 

      Annotation

    • D. 

      Flow Line

    • E. 

      Procedure

  • 6. 
    Which of the following statements is False?
    • A. 

      The flowchart should be clear, precise and easy to follow

    • B. 

      The input, process, output, and display symbols should have only one flow line.

    • C. 

      Flowcharts can have only one start point and one end point

    • D. 

      The start and stop symbols should have only a single flow line

    • E. 

      In a flowchart all the necessary inputs should be listed out in a logical order

  • 7. 
    Which of the following statements is true?
    • A. 

      Pseudocode help in understanding the logic better when compared to flowcharts

    • B. 

      The flowcharts do not act as a guide during the program development phase

    • C. 

      Flowcharts are a better method of communicating logic than pseudocode and decision tables

    • D. 

      Flowcharts are a better technique to use in case of complex conditions compared to decision tables

  • 8. 
    ____________ represent algorithms that involve complex decision-making.
    • A. 

      Flowcharts

    • B. 

      Decision Tables

    • C. 

      Programs

    • D. 

      Pseudocode

  • 9. 
    What are the four components of a Decision Table? (Choose all that apply)
    • A. 

      Action Applied

    • B. 

      Condition Stub

    • C. 

      Action Stub

    • D. 

      Condition Applied

    • E. 

      Action Taken

  • 10. 
    The accept keyword in a pseudocode is similar to the _____________ symbol in a flowchart.
    • A. 

      Output

    • B. 

      Input

    • C. 

      Start

    • D. 

      Subroutine

    • E. 

      Decision

  • 11. 
    How would you declare a variable to store the gender of a person?
    • A. 

      Character n Gender

    • B. 

      String sGender

    • C. 

      Character cGender

    • D. 

      Numeric nGender

  • 12. 
    A nAge variable is declared to store the age of a person. How would you intialize the variable to 25? (Choose all that apply)
    • A. 

      25 = nAge

    • B. 

      NAge = 25

    • C. 

      NAge is 25

    • D. 

      Display "Enter the age" Accept nAge

    • E. 

      Set nAge to 25

  • 13. 
    • A. 

      String nName = Tom

    • B. 

      String nName = "Tom"

    • C. 

      Character nName = Tom

    • D. 

      Character nName = "Tom"

    • E. 

      Character nName = 'Tom'

  • 14. 
    Which of the following is/are valid variable name/s? (Choose all that apply)
    • A. 

      NBasic Salary

    • B. 

      NBasicSalary

    • C. 

      NBasic.Salary

    • D. 

      NBasic_Salary

    • E. 

      Basic Salary

  • 15. 
    Indicate whether the following statements are true or false. Statement 1: A variable needs to be declared before being used in a program Statement 2: A variable can be used without being intialized
    • A. 

      Statement 1 is True and Statement 2 is false

    • B. 

      Both statements are true

    • C. 

      Statement 1 is false and Statement 2 is true

    • D. 

      Both statements are false

  • 16. 
    In the following expression z = x + y x and y are called:
    • A. 

      Operators

    • B. 

      Values

    • C. 

      Operands

    • D. 

      Literals

  • 17. 
    Study the following pseudocode. begin numeric nNum1, nNum2, nNum3 nNum1 = 20 nNum2 = 4 nNum3 = nNum1 % nNum2 Display nNum end What will be the output?
    • A. 

      0

    • B. 

      5

    • C. 

      Undefined

    • D. 

      1

  • 18. 
    Which operators are used to test the relationship between two variables or between a variable and a constant?
    • A. 

      Arithmetic operators

    • B. 

      Logical operators

    • C. 

      Relational operators

    • D. 

      Special operators

  • 19. 
    Which of the following is a logical operator?
    • A. 

    • B. 

      And

    • C. 

      ()

    • D. 

      +

  • 20. 
    If an expression contains an addition operator, a less than operator, and a subtraction operator, which operator has a higher priority when evaluating the expression?
    • A. 

      Addition operator

    • B. 

      Subtraction operator

    • C. 

      Less than operator

    • D. 

      All the three operators

  • 21. 
    • A. 

      =

    • B. 

      %

    • C. 

      !=

    • D. 

    • E. 

      *

  • 22. 
    If x=2 NOT x=3 will result in:
    • A. 

      True

    • B. 

      False

  • 23. 
    Which operator has the highest precedence level?
    • A. 

      ()

    • B. 

      !

    • C. 

      AND

    • D. 

      *

    • E. 

      %

  • 24. 
    • A. 

      9.5

    • B. 

      0

    • C. 

      90

    • D. 

      25

    • E. 

      60

  • 25. 
    • A. 

      NNum1 = 2, nNum2 = 3

    • B. 

      NNum1 = 3, nNum2 = 3

    • C. 

      NNum1 = 3, nNum2 = 2

    • D. 

      NNum1 = 2, nNum2 = 2

  • 26. 
    If 6 and 4 were entered respectively for number 1 and number 2 then what will be displayed when the following program executes? begin numeric nNum1, nNum2, nResult display “Enter number1 and number2 accept nNum1 accept nNum2 nResult = nNum1 + nNum2 if(nResult % 2 = 0) begin display “The result is even” end else begin display “The result is odd” end end
    • A. 

      The result is even

    • B. 

      The result is odd

    • C. 

      Even

    • D. 

      Odd

    • E. 

      Nothing is displayed

  • 27. 
    Is the following statement true or false? Statement: if constructs and switch...case constructs are decision-making constructs
    • A. 

      False

    • B. 

      True

  • 28. 
    Is the following statement true or false? Statement: The switch construct consists one case statement, a number of switch instructs, and a default statement
    • A. 

      False

    • B. 

      True