Skip to content

Question bank

Every question, by chapter, year, marks and type.

79 questions

  • Specimen question

    2 marks

    A matrix M[-6….10, 4…15] is stored in the memory with each element requiring
    4 bytes of storage. If the base address is 1025, find the address of M when
    the matrix is stored in column major wise.

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    4 marks
    1. (a)

      Reduce the Boolean function F(P,Q,R,S) = (P+Q+R+S) •(P+Q+R+Sꞌ) •
      (P+Q+Rꞌ+S)•(P+Qꞌ+R+S) • (P+Qꞌ+R+Sꞌ) • (P+Qꞌ+Rꞌ+S) • (P+Qꞌ+Rꞌ+Sꞌ)
      •(Pꞌ+Q+R+S)• (Pꞌ+Q+R+Sꞌ) by using 4-variable Karnaugh map, showing the
      various groups (i.e. octal, quads and pairs).

    2. (b)

      Draw the logic gate diagram for the reduced expression. Assume that the
      variables and their complements are available as inputs.
      --------------------------------------------------------------------------------------------------------------------------------

    Class 12 Computer ScienceMap based

    No answer yet
  • Specimen question

    1 mark

    For Big O notation, state the difference between O(n) and O(n2).

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    4 marks

    From the given logic diagram :

    1. (a)

      Derive Boolean expression and draw the truth table for the derived
      expression.

    2. (b)

      If A=1, B=0 and C=1 then find the value of X.

    Class 12 Computer ScienceDiagram based

    No answer yet
  • Specimen question

    1 mark

    Name the entity described above and state its principle.
    ----------------------------------------------------------------------------------------------------------------------------------

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    3 marks

    Verify if the following proposition is valid using the truth table:
    (X ∧Y) =>Z = (Y =>Z) ∧ (X =>Y)

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    1 mark

    Study the given propositions and the statements marked Assertion and Reason that
    follow it. Choose the correct option on the basis of your analysis.
    p = I am a triangle
    q = I am a three-sided polygon
    s1 = p → q
    s2 = q → p
    Assertion: s2 is converse of s1
    Reason: Three-sided polygon must be a triangle.

    Class 12 Computer ScienceMCQ

    No answer yet
  • Specimen question

    5 marks

    A shopping mall announces a special discount on all its products as a festival offer
    only to those who satisfy any one of the following conditions.• If he/she is an employee of the mall and has a service of more than 10 years.

    • A regular customer of the mall whose age is less than 65 years and shouldnot be an employee of the mall.

    • If he/she is a senior citizen but not a regular customer of the mall.The inputs are :
    INPUTS
    E Employee of the mall
    R Regular customer of the mall
    S Service of the employee is more than 10 years
    C Senior citizen of 65 years or above
    (In all the above cases, 1 indicates yes and 0 indicates no.)
    Output: X - Denotes eligible for discount [1 indicates YES and 0 indicates NO in
    all cases]
    Draw the truth table for the inputs and outputs given above and write the
    SOP expression for X ( E, R, S, C ).

    Class 12 Computer ScienceDiagram based

    No answer yet
  • Specimen question

    1 mark

    Given below are two statements marked Assertion and Reason. Read the two
    statements carefully and choose the correct option.
    Assertion: In Java, the String class is used to create and manipulate strings, and it
    is immutable.
    Reason : Immutability ensures that once a String object is created, its value cannot
    be changed.

    Class 12 Computer ScienceMCQ

    No answer yet
  • Specimen question

    2 marks

    Convert the following infix notation to prefix form.
    (A–B)/C*(D+E)

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    5 marks

    Draw the logic circuit to decode the following binary number (0001, 0101, 0111,
    1000, 1010, 1100, 1110,1111) to its hexadecimal equivalents. Also state the
    Hexadecimal equivalents of the given binary numbers.

    Class 12 Computer ScienceDiagram based

    No answer yet
  • Specimen question

    1 mark

    A full adder needs five gates and those are 3 AND gates, 1 OR gate and 1 XOR
    gate. When a full adder is constructed using 2 half adders, it also requires 5 gates.
    State the names along with the quantity those gates.
    --------------------------------------------------------------------------------------------------------------------------------

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    4 marks

    Specify the class ReCycle giving details of the functions void pushfront(int) and
    int poprear( ). Assume that the other functions have been defined.
    The main( ) function and algorithm need NOT be written.

    Class 12 Computer ScienceLong answer

    No answer yet
  • Specimen question

    1 mark

    Answer the following questions related to the below image:

    1. (a)

      What is the output of the above gate if input A=0, B=1?

    2. (b)

      What are the values of the inputs if output =1?
      ----------------------------------------------------------------------------------------------------------------------------------
      SECTION – B
      Answer any two questions.
      Each program should be written in such a way that it clearly depicts the logic of the problem.
      This can be achieved by using mnemonic names and comments in the program.
      (Flowcharts and Algorithms are not required.)
      The programs must be written in Java.

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    1 mark

    The following is a function of class Armstrong. This recursive function calculates
    and returns the sum of the cubes of all the digits of num, where num is an integer
    data member of the class Armstrong.
    [A number is said to be Armstrong if the sum of the cubes of all its digits is equal
    to the original number].
    There are some places in the code marked by ?1?, ?2?,?3? which may be replaced
    by a statement/expression so, that the function works properly.
    public int sumOfPowers(int num)
    {
    if (num == 0)
    return ?1?;
    int digit = ?2?;
    return (int) Math.pow(digit, 3) + ?3?;
    }

    1. (a)

      What is the expression or statement at ?1?

    2. (b)

      What is the expression or statement at ?2?

    3. (c)

      What is the expression or statement at ?3?
      ----------------------------------------------------------------------------------------------------------------------------------
      PART II– 50 MARKS
      Answer six questions in this part, choosing two questions from
      SECTION - A
      Answer any two questions.

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    1 mark

    Consider the following statement written in class Circle where pi is its data
    member.
    static final double pi = 3.142;
    Which of the following statements are valid for pi?I. It contains a common value for all objects class Circle.II. Its value is non-changeable.III. At a time two access modifiers, static and final, cannot be applied to a singledata member pi.

    Class 12 Computer ScienceMCQ

    No answer yet
  • Specimen question

    1 mark

    According to the Principle of duality, the Boolean equation
    (Aꞌ + B) • (1 + B) = Aꞌ + B will be equivalent to:

    Class 12 Computer ScienceMCQ

    No answer yet
  • Specimen question

    5 marks

    Reduce the above expression X ( E, R, S, C ) by using 4-variable Karnaugh map,
    showing the various groups (i.e. octal, quads and pairs).
    Draw the logic gate diagram for the reduced expression. Assume that the variables
    and their complements are available as inputs.

    Class 12 Computer ScienceMap based

    No answer yet
  • Specimen question

    2 marks

    A linked list is formed from the objects of the class Node. The class structure of the
    Node is given below:
    class Node
    {
    int n;
    Node link;
    }
    Write an Algorithm OR a Method to search for a number from an existing linked list.
    The method declaration is as follows:
    void FindNode( Node str, int b )

    Class 12 Computer ScienceShort answer

    No answer yet
  • Specimen question

    1 mark

    Given below are two statements marked Assertion and Reason. Read the two
    statements carefully and choose the correct option.
    Assertion: Recursion utilises more memory as compared to iteration.
    Reason: Time complexity of recursion is higher due to the overhead of
    maintaining the function call stack.

    Class 12 Computer ScienceMCQ

    No answer yet