How Well Can You Score In The Computer Programming Quiz?

82 Questions | Total Attempts: 223

SettingsSettingsSettings
Please wait...
How Well Can You Score In The Computer Programming Quiz?

How well can you score in the computer programming quiz? If you consider yourself that you know it all when it comes to programming and is looking for a challenge. The quiz will be exactly what you need, so be sure to check out each question and give the answer that’s right according to you. Be on the lookout for other programming quizzes.


Questions and Answers
  • 1. 
    Write a biconditional state for P=The shape is a rectangle q=The shape has four sides.
  • 2. 
    Programming in c/c++ use "stdio.h" for standard libraly
    • A. 

      True

    • B. 

      False

  • 3. 
    If the person is not a vegetarian than the person does not(not) eat meat.Is an example of what kind of statement?
    • A. 

      Biconditional

    • B. 

      Contrapositive

    • C. 

      Inverse

  • 4. 
    Example: p= A person is  a vegetarianq=the person does not each beerIf the person is not a vegetarian than the person does not(not) eat meat.In this situation not and not cancel each other out
    • A. 

      True

    • B. 

      False

  • 5. 
    A contrapositive statement is represented with the symbols ______________
  • 6. 
    Which of the following is the contrapositive of the statement If the shape is a rectangle (p) then the shape has four sides(q). 
    • A. 

      If the shape does not have four side then the shape is not a rectangle

    • B. 

      If the shape is a rectangle (p) then the shape has four sides(q)

    • C. 

      If the shape has four sides the shape is a rectangle

  • 7. 
    Is the following an inverse statement of If the shape is a rectangle then the shapes has four sides.If a shape is not a rectangle then it does not have four sides,
    • A. 

      True

    • B. 

      False

  • 8. 
    Which of the following is a converse conditional statement in symbols
    • A. 

      P->q

    • B. 

      QP

    • C. 

      Q->p

  • 9. 
    The inverse of: If a shape is a rectangle then the shape has four sides.
    • A. 

      If a shape is not a rectangle then it does not have four sides.

    • B. 

      IF a shape is a rectangle if and only if it does not have four sides.

    • C. 

      Penguin.

  • 10. 
    Choose correct Truth table for ~P and ~P->Q if the P column is  TTFF and if the Q  column is TFTF 
    • A. 

      TFTT;TFTT

    • B. 

      FFTT;TFTT

    • C. 

      FFTT;TFTF

  • 11. 
    P<->q symbolizes which of the following?
    • A. 

      Conditional

    • B. 

      Biconditional

    • C. 

      Inverse

  • 12. 
    If the shape is a rectangle then the shape has four sides is and example of ___________ statement.
  • 13. 
    The Maximum width of a C variable name can be ________________.
    • A. 

      20 Character

    • B. 

      32 Character

  • 14. 
    A flowchart is graphical representation of an algorithm.
    • A. 

      True

    • B. 

      False

  • 15. 
    An algorithm consists of a set of explicit and unambiguous finite steps.
    • A. 

      True

    • B. 

      False

  • 16. 
    The C programming language was developed by Charles Babbage.
    • A. 

      True

    • B. 

      False

  • 17. 
    The C complier runs a program called the C Processor.
    • A. 

      True

    • B. 

      False

  • 18. 
    Strcpy is used to copy the string.
    • A. 

      True

    • B. 

      False

  • 19. 
    Pointer is mainly used Point out the Function.
    • A. 

      True

    • B. 

      False

  • 20. 
    A Header File is a file that contains Definitions and Macros.
    • A. 

      True

    • B. 

      False

  • 21. 
    A link is a Complier.
    • A. 

      True

    • B. 

      False

  • 22. 
    Do while loop tests the condition at the End of the Loop.
    • A. 

      True

    • B. 

      False

  • 23. 
    The ___________________ loop executes at least once.
    • A. 

      Break

    • B. 

      Stop

  • 24. 
    In face “++” has a higher precendence than “*”.
    • A. 

      True

    • B. 

      False

  • 25. 
    Null will be defined as something else.
    • A. 

      True

    • B. 

      False

  • 26. 
    Scanf function is used to display information on the Monitor.
    • A. 

      True

    • B. 

      False

  • 27. 
    A for loop is used to execute a section of code a specific number of times.
    • A. 

      True

    • B. 

      False

  • 28. 
    A do while loop is very similar to a while loop.
    • A. 

      True

    • B. 

      False

  • 29. 
    The break key word allows you to jump out of any loop at any time.
    • A. 

      True

    • B. 

      False

  • 30. 
    The continue keyword is used in loops to skip right to the test condition.
    • A. 

      True

    • B. 

      False

  • 31. 
     The Return Statement is optional.
    • A. 

      True

    • B. 

      False

  • 32. 
    In C all function except main() can be called recursively.
    • A. 

      True

    • B. 

      False

  • 33. 
     In function two return statement should never occur.
    • A. 

      True

    • B. 

      False

  • 34. 
     C program is developed with the help of C++ language.
    • A. 

      True

    • B. 

      False

  • 35. 
    If Else statement is used when both the statements are False.
    • A. 

      True

    • B. 

      False

  • 36. 
    “C” language has been developed by “Dennis Ritchie”.
    • A. 

      True

    • B. 

      False

  • 37. 
    The maximum width of a “C” variable name can be 10 character.
    • A. 

      True

    • B. 

      False

  • 38. 
    “C” is a low level language.
    • A. 

      True

    • B. 

      False

  • 39. 
     ____________________ of the following is allowed in a C arithmetic instruction.
    • A. 

      ()

    • B. 

      []

  • 40. 
     ________________ are the ASCII values for number 0-9.
    • A. 

      23-45

    • B. 

      48-57

  • 41. 
     In the C Language ‘A’ represents ________________.
    • A. 

      A Digit

    • B. 

      A Character

  • 42. 
    To find factorial of A by using while loop,  A will be ________________.
    • A. 

      A

    • B. 

      A>0

  • 43. 
     ___________________ does not represent a valid storage class in “C”.
    • A. 

      Automatic

    • B. 

      Union

  • 44. 
     In ‘C’ logical AND operator is represented as ___________________.
    • A. 

      Binary

    • B. 

      DOS

  • 45. 
    ___________________ keyword is used to exit loops at arbitrary spots.
    • A. 

      Break

    • B. 

      CLOSE

  • 46. 
    The Expression, A=30*1000+2768 evaluates to ________________.
    • A. 

      -32768

    • B. 

      32768

  • 47. 
    Macros are defined using ___________________ statement.
    • A. 

      #define

    • B. 

      #include

  • 48. 
    C Language came into existence in the year ____________________. 
    • A. 

      1971

    • B. 

      1972

  • 49. 
    The maximum value that an integer constant can have is ____________________.
    • A. 

      -3276700%

    • B. 

      3276700%

  • 50. 
    The goto statement causes control to go to ___________________.
    • A. 

      An operator

    • B. 

      A label

  • 51. 
    An ___________________ is a collection of data items its called elements.
    • A. 

      Array

    • B. 

      Structure

  • 52. 
    The Symbol && is read as ____________________.
    • A. 

      AND

    • B. 

      OR

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

      Operators

    • B. 

      Values

    • C. 

      Operands

    • D. 

      Literals

  • 54. 
    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

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

      False

    • B. 

      True

  • 56. 
    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

  • 57. 
    What are the values of nNum1 and nNum2 after the following program executes? begin numeric nNum1=2 numeric nNum2=3 numeric nSwap nSwap = nNum1 nNum1 = Num2 nNum2 = Num1 end
    • A. 

      NNum1 = 2, nNum2 = 3

    • B. 

      NNum1 = 3, nNum2 = 3

    • C. 

      NNum1 = 3, nNum2 = 2

    • D. 

      NNum1 = 2, nNum2 = 2

  • 58. 
    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

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

      ()

    • B. 

      !

    • C. 

      AND

    • D. 

      *

    • E. 

      %

  • 60. 
    Which of the following is/are relational operator? (Choose all that apply)
    • A. 

      =

    • B. 

      %

    • C. 

      !=

    • D. 

    • E. 

      *

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

      True

    • B. 

      False

  • 62. 
    ___________ helps you perform a logic check and understand the flow of control in an algorithm.
    • A. 

      Documentation

    • B. 

      Dry run

    • C. 

      Logical operators

    • D. 

      Arithmetic operators

  • 63. 
    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

  • 64. 
    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

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

    • B. 

      And

    • C. 

      ()

    • D. 

      +

  • 66. 
    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

  • 67. 
    A variable used to store the name of customers is to be declared. Which of the following declares the variable and intializes it to Tom? (Choose all that apply)
    • A. 

      String nName = Tom

    • B. 

      String nName = "Tom"

    • C. 

      Character nName = Tom

    • D. 

      Character nName = "Tom"

    • E. 

      Character nName = 'Tom'

  • 68. 
    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

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

      Flowcharts

    • B. 

      Decision Tables

    • C. 

      Programs

    • D. 

      Pseudocode

  • 70. 
    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

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

      Output

    • B. 

      Input

    • C. 

      Start

    • D. 

      Subroutine

    • E. 

      Decision

  • 72. 
    The if ... else keyword in a pseudocode is similar to the _____________ symbol in a flowchart.
    • A. 

      Annotation

    • B. 

      Procedure

    • C. 

      Decision

    • D. 

      Process

    • E. 

      Subroutine

  • 73. 
    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

  • 74. 
    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

  • 75. 
    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

  • 76. 
    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

  • 77. 
    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

  • 78. 
    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

  • 79. 
    Which of the following is NOT a type of algorithm?
    • A. 

      Program

    • B. 

      Flowchart

    • C. 

      Decision Table

    • D. 

      Pseudocode

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

      A procedure symbol

    • B. 

      An annotation symbol

    • C. 

      A flow line

    • D. 

      A subroutine

  • 81. 
    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

  • 82. 
    What is the result of the following pseudocode? begin numeric nNum1, nNum2, nNum3, nResult nNum1 = 8 nNum2 = 9 nNum3 = 10 nResult = nNum1+nNum2*nNum3/45+15 Display nResult end
    • A. 

      9.5

    • B. 

      0

    • C. 

      90

    • D. 

      25

    • E. 

      60