All questions of Practice Test: Full Length for Computer Science Engineering (CSE) Exam

1 Crore+ students have signed up on EduRev. Have you? Download the App

I was ___ ___  for the bus and then I ___ sight of Craig passing by.
  • a)
    Here, waiting, cot
  • b)
    There, waiting, caught
  • c)
    Here, weighting, caught
  • d)
    Hare, waiting, caught
Correct answer is option 'B'. Can you explain this answer?

Rohan Shah answered
The word 'here' and 'there' both can be used here but should be followed with 'waiting' as no other word can fit here. The word 'caught' is correct here as 'catch a sight' means 'to see something.' Option 2 thus has the correct combination of words. The word 'cot' means 'a small bed with high barred sides for a baby or very young child.'

Consider a relation A with n elements. What is the total number of relations which can be formed on A which are irreflexive?
  • a)
  • b)
  • c)
    2n
  • d)
Correct answer is option 'A'. Can you explain this answer?

Ravi Singh answered
A relation  on a set  is irreflexive provided that no element is related to itself; in other words,  for no  in .
An irreflexive relation contains (n2 - n) elements.
Therefore, number of irreflexive relations =

If we increase the sides of a rectangular park by 20% , then, what is the total increase in the area of that park ?
  • a)
    21 %
  • b)
    33 %
  • c)
    42 %
  • d)
    44 %
Correct answer is option 'D'. Can you explain this answer?

Let length of park = L and breadth of park = B Original Area = BL m2 New Length = 120L/100 = 6L/5 New Breadth = 120B/100 = 6B/5 New Area = 36LB/25 m2 so, Change in area = New – Original = 11LB/25 m2 % increase = Change / original * 100 = 44%

Which of the following languages are regular over ∑ = {a, b}?
L1 = { anbn | 0 < n ≤ 10}
L2 = { a2n | n ≥ 1}
L3 = { an! | n > 0}
  • a)
    L2 only.
  • b)
    L1 only.
  • c)
    L1 and L2.
  • d)
    None of L1, L2 and L3.
Correct answer is option 'C'. Can you explain this answer?

Ravi Singh answered
Any language for which we have a finite set or we can possibly have a DFA drawn for it is regular. L1: It gives a finite set generating string with equal number of a’s and equal number of b’s for range 0
Hence L2 is also regular. L3: It gives all possible strings with a’s such that number of a’s are in factorial values of 1,2,3,4 ……. i.e. {a1, a2, a6, a24 ……………}. The set is neither finite nor a DFA is possible for such set. Hence L3 is not regular.

Find the subnet address for the IP address 165.81.35.120 and subnet mask is 255.255.192.0.
  • a)
    255.255.0.0
  • b)
    165.81.192.0
  • c)
    165.81.0.0
  • d)
    165.81.35.0
Correct answer is option 'C'. Can you explain this answer?

Ravi Singh answered
IP address → 165.81.35.120 → 10100101 01010001 00100011 01111000
Subnet mask → 255.255.192.0 → 11111111 11111111 11000000 00000000
IP address                   10100101 01010001 00100011 01111000
Subnet mask               11111111 11111111 11000000 00000000
Subnet address           10100101 01010001 00000000 00000000
Subnet address → 10100101 01010001 00000000 00000000 → 165.81.0.0

There are 5 brothers in a family. All were born at a gap of 3 years. If the sum total of ages of 5 brothers is 100. What is the age of 2nd most elder brother ?
  • a)
    13
  • b)
    15
  • c)
    23
  • d)
    26
Correct answer is option 'C'. Can you explain this answer?

Let the age of youngest brother be x
Then, x + (x + 3) + (x + 6) + (x + 9) + (x + 12) = 100 => 5x = 70 => x = 14
Therefore, age of 2nd most elder brother = 14 + 9 = 23.

What is the number missing from the table?
  • a)
    45
  • b)
    48
  • c)
    51
  • d)
    54
Correct answer is option 'B'. Can you explain this answer?

Shounak Sharma answered
XY + Z = X(Y + Z)
⇒ XY + Z = XY + XZ
⇒ Z = XZ ⇒ Z - XZ = 0 ⇒ Z (1 - X) = 0
Either Z = 0 (in this case X can take any value) OR X = 1 (in this case Z can take any value).
X = 1 or Z = 0
5 × 3 + 1 = 16
16 × 3 + 1 = 49
9 × 3 + 2 = 29
29 × 3 + 2 = 89
15 × 3 + 3 = 48
48 × 3 + 3 = 147

What will the output of the following C code ?
  • a)
    1
  • b)
    2
  • c)
    3
  • d)
    4
Correct answer is option 'A'. Can you explain this answer?

Vedika Singh answered
Consider the while loop condition => i + 1 ? --i : j++ In first iteration : i + 1 = 3 (true) So ternary operator will return --i i.e. 1, condition part is 1 means true so while condition is true. Hence printf statement will print 1 In second iteration : i + 1 =2 (true) So ternary operator will return --i i.e 0, condition part is 0 means false so while condition is false. Hence program control will come out of the while loop.

Given below is a system of linear equations.
5a + b + 3c = 5
9a + c = -8
a + 2b + 5c=8
This system of equations has,
  • a)
    A unique solution
  • b)
    Infinitely many solution
  • c)
    No solution
  • d)
    Cannot be determined
Correct answer is option 'B'. Can you explain this answer?

Yash Patel answered
Comparing the system of equation with the matrix equation,
A.X = B
We have,
A = , B =
Augmented matrix is given by,
Applying, R3→R3−(2R1−R2)
We get,
Thus, Rank(A)=Rank(A:B)=2 < />
Hence, the system of equations is consistent and has infinitely many solutions.

Given a graph G (V, E) is Bipartite, what is the chromatic number of G ?
  • a)
    2
  • b)
    3
  • c)
  • d)
    Can't be decided
Correct answer is option 'A'. Can you explain this answer?

Since the graph G is bipartite, the vertices set V can be partitioned into two disjoint sets. This shows that we can color the graph with 2 colors such that no two adjacent vertices will have same color.

Mean of 12 observation was found to be 28. Later on, it was detected that an observation 62 was misread as 26. Then the correct mean of the observations is
  • a)
    28
  • b)
    31
  • c)
    33
  • d)
    36
Correct answer is option 'B'. Can you explain this answer?

Soumya Dey answered
Given, mean of 12 observation was found to be 28.
Mean = sum of observations/number of observations.
Sum of observations = 12 × 28 = 336
Now, it was detected that an observation 62 was misread as 26.
∴ Correct mean = 

Can you explain the answer of this question below:

Let T(n) = 2T(n/4) + 100√n 

The value of T(n) can be written as:

  • A:

    θ(√ n)

  • B:

    θ(√n log n)

  • C:

    θ(n)

  • D:

    θ(n log n)

The answer is b.

Pranjal Sen answered
The time complexity of the given recurrence relation can be found using the Master Theorem.

The Master Theorem states that if a recurrence relation is of the form T(n) = aT(n/b) + f(n), where a ≥ 1, b > 1, and f(n) is a polynomial function, then:

- If f(n) = O(n^(log_b(a)-ε)) for some ε > 0, then T(n) = Θ(n^(log_b(a))).
- If f(n) = Θ(n^(log_b(a))), then T(n) = Θ(n^(log_b(a)) * log(n)).
- If f(n) = Ω(n^(log_b(a)+ε)) for some ε > 0, and if a*f(n/b) <= c*f(n)="" for="" some="" constant="" c="">< 1="" and="" sufficiently="" large="" n,="" then="" t(n)="" />

In the given recurrence relation, a = 2, b = 4, and f(n) = 100, which is a constant.

log_b(a) = log_4(2) = 1/2

f(n) = O(n^(log_b(a)-ε)) for any ε > 0, since f(n) is a constant and n^(log_b(a)-ε) approaches 0 as n goes to infinity.

Therefore, by the Master Theorem, T(n) = Θ(n^(log_b(a))) = Θ(n^(1/2)).

Hence, the time complexity of the given recurrence relation is Θ(n^(1/2)).

The minimum number of bits required to represent - 64 in 2’s complement representation is _________.
    Correct answer is '7'. Can you explain this answer?

    Yash Patel answered
    Whenever a number is in 2n form then the minimal 2’s complement representation is 1 followed by n number of zeros.
    So, – 64 = – 26 = 1000000

    A digital computer has a memory unit of 256k x 16 and a cache memory of 4k words. The cache uses direct mapping with a block size of 16 words.
     
    Q. How many bits are there in index, tag, block and words fields of address format ?
    • a)
      10, 6, 8, 2
    • b)
      12, 6, 8, 4
    • c)
      12, 8, 6, 4
    • d)
      10, 6, 8, 4
    Correct answer is option 'B'. Can you explain this answer?

    Rajeev Sharma answered
    Main Memory has 256k = 2^8 x 2^10 = 2^18.
    i.e. We need 18 bits to address main memory.
    Cache Memory has 4k = 2^2 x 2^10 = 2^12.
    i.e. We need 12 bits to address cache memory.
    Cache consists of Index and tag which together are used to address main memory location.
    Here Index is 12 bits and tag is 6 bits. (18 – 12 = 6).
    Index is divided into block part and word part. Block part is used to address blocks in cache and word part addresses individual word in a block.
    Here a block size is 16 words. i.e. 2^4, we need 4 bits to address a word and 12 – 4 = 8 bits to address a block in cache memory.

    Let L1 be a regular language, L2 be a deterministic context-free language and L3 a recursively enumerable but not recursive language.
    Which one of the following statements is false?
    • a)
      L1 ∩ L2 is a deterministic CFL
    • b)
      L3 ∩ L1 is recursive
    • c)
      L1. L2 is context free
    • d)
      L1∩ L2∩ L3 is recursively enumerable
    Correct answer is option 'B'. Can you explain this answer?

    Anagha Chopra answered
    Explanation:

    To determine which of the given statements is false, let's analyze each option one by one.

    Option 'a': L1 ∩ L2 is a deterministic CFL

    The intersection of a regular language (L1) and a deterministic context-free language (L2) can be either regular or context-free. Since both regular languages and deterministic context-free languages are closed under intersection, the intersection of L1 and L2 will also be either regular or deterministic context-free.

    Therefore, option 'a' is true.

    Option 'b': L3 ∩ L1 is recursive

    The intersection of a recursively enumerable language (L3) and a regular language (L1) can be either recursively enumerable or recursive. However, the option states that L3 ∩ L1 is recursive, which may not always be true. It is possible for the intersection to be recursively enumerable but not recursive.

    Therefore, option 'b' is false.

    Option 'c': L1 . L2 is context free

    The concatenation of a regular language (L1) and a deterministic context-free language (L2) will always result in a context-free language. Regular languages are a subset of context-free languages, and the concatenation operation preserves the context-free property.

    Therefore, option 'c' is true.

    Option 'd': L1 ∩ L2 ∩ L3 is recursively enumerable

    The intersection of three languages, L1, L2, and L3, can be recursively enumerable. Since recursively enumerable languages are closed under intersection, the intersection of L1, L2, and L3 will also be recursively enumerable.

    Therefore, option 'd' is true.

    In summary, the false statement is option 'b': L3 ∩ L1 is recursive.

    X, Y and Z are the three contestants in one km race. If X can give Y a start of 52 metres and X can also give Z a start of 83 metres, how many metres start Y can give Z?
    • a)
      33.3 m
    • b)
      33 m
    • c)
      32 m
    • d)
      32.7 m
    Correct answer is option 'D'. Can you explain this answer?

    Ravi Singh answered
    While X runs 1000 metre, Y runs (1000-52) = 948 metre and Z runs (1000-83) = 917 metre
    i.e., when Y runs 948 metre, Z runs 917 metre
    ⇒ When Y runs 1000 metre, Z runs 917/948 x 1000 = 967.30 metre
    i.e., Y can give Z (1000-967.30) = 32.7 metre

    Consider the following weighted graph. Bellman-Ford algorithm is implemented on the given graph with source P. The shortest distance from source P to vertex T is ______.
      Correct answer is '2'. Can you explain this answer?

      Ananya Kumari answered
      Consider the following weighted graph . bellman - Ford algorithm is implemented on the given on the given graph with source p. the shortest distance from source p to verte lx T is ans

      2 and -1 and 2 or 1 about -1 and 1 or 2 the 3
      ans 2

      A system has 3 resources and 5 processes competing for them. Each process can request a maximum of N instances. The largest value of N that will always avoid deadlock is _______.
        Correct answer is '1'. Can you explain this answer?

        Aaditya Ghosh answered
        Distribute each process to one less than maximum request resources i.e. 5(N - 1)
        Total no. of resources = 5(N - 1) + 1 = 5N - 2
        If total no. resources are greater than given resources then a deadlock will occur.
        5N – 2 <= 3
        5N <= 5
        N <= 1

        Direction: Study the information carefully to answer the questions that follow.
        In Vimla public school, students can choose among three sports Cricket, Football and Hockey. Out of 1000 students, each one is required to play at least one of the three sports. 40 students play all three sports. 380 students play only Hockey, 170 students play only Cricket, 60 students play exactly two sports Hockey and cricket and 240 students play only Football.
        What is the number of students who play exactly two sports?
        • a)
          155
        • b)
          170
        • c)
          200
        • d)
          140
        Correct answer is option 'B'. Can you explain this answer?

        Sarita Yadav answered
        It is given that the total number of students are = 1000
        Only Hockey = 380
        Only Cricket = 170
        Only Football = 240
        Hockey + Cricket + Football = 40 {all the three sports}
        Now, let X be the number of students who play Cricket and Football.
        And Y is the number of students who play football and hockey.
        Now total number of students,
        170 +60 +40 +380+ 240+ X + Y= 1000
        X + Y = 110
        And 60 students play only hockey and cricket, and that number we get after removing students who play all three sports from students who play hockey and cricket.
        X + Y + 60 = 110+ 60 = 170
        There are 170 students who play exactly two sports.

        The 32 bit floating point representation of (-12) is ___
        • a)
          11000000010000000000000000000000
        • b)
          11000001010000000000000000000000
        • c)
          01000001110000000000000000000000
        • d)
          11000000110000000000000000000000
        Correct answer is option 'B'. Can you explain this answer?

        To convert the floating point into decimal, we have 3 elements in a 32-bit floating point representation:
        Sign (MSB)
        Exponent (8 bits after MSB)
        Mantissa (Remaining 23 bits)
        Sign bit is the first bit of the binary representation. ‘1’ implies negative number and ‘0’ implies positive number. Sign bit=1
        Exponent is decided by the next 8 bits of binary representation.
        Hence the exponent of 2 will be 3. i.e 23=8.
        127 is the unique number for 32 bit floating point representation. It is known as bias. It is determined by 2k-1-1 where ‘k’ is the number of bits in exponent field.
        Thus bias = 127 for 32 bit. (28-1-1 = 128-1=127)
        127+3=130 i.e. 10000010 in binary representation.
        Mantissa: 12 in binary = 1100
        Move the binary point so that there is only one bit from the left. Adjust the exponent of 2 so that the value does not change. This is normalizing the number.
        1.100 x 23
        10000000000000000000000
        Thus the floating point representation of -12 is
        1 10000010 10000000000000000000000

        A sum of Rs. 400 amounts to Rs. 480 in 4 years. What will it amount to if the rate of interest is increased by 2 % for the same time?
        • a)
          Rs. 512
        • b)
          520Rs.
        • c)
          Rs.490
        • d)
          Rs.515
        Correct answer is option 'A'. Can you explain this answer?

        Sanvi Kapoor answered
        We know that, S.I = P x R x T / 100
        A = S.I + P
        480 = 5.1+400
        ⇒S.I = 480 − 400 = 80
        ⇒S.I = P × R × T100
        ⇒80 = 400 × R × 4100
        ⇒R = 5%
        Now rate is increased by 2% So, new rate is 7% New S.I=400 × 7 × 4 / 100 = Rs.112
        New Amount = S.I + P = 112 + 400 = Rs.512

        The number of 4 line to-16 line decoders required to make an 8-line-to-256 line decoder is
        • a)
          12
        • b)
          17
        • c)
          23
        • d)
          35
        Correct answer is option 'B'. Can you explain this answer?

        Sarita Yadav answered
        8-line to-256-line decoder using 4-line to-16-line decoders is shown below
        Number of 4 x 16 MUX required
        = 256 / 16 + 16/16 = 16 + 1 = 17

        Consider the following regular expressions over the alphabet {0, 1}.
        I. 1* 0(0 + 1)*
        II. (0 + 1)* 01*
        III. 1* 0(1 + 0)* + (0 + 1)* 01*
        Which of the above regular expressions are equivalent?
        • a)
          I and III only
        • b)
          I and II only
        • c)
          II and III only
        • d)
          I, II and III
        Correct answer is option 'D'. Can you explain this answer?

        Ravi Singh answered
        I and II are quite easy to understand - both denote strings containing at least one 0. III is actually the union of I and II, but III is again denoting strings containing at least one 0, as both regular expressions (i.e. I and II) are equivalent, so union won't make any difference.
        Hence all 3 regular expressions are equivalent.

        The language L = {WbcWR | W ∈ (a+b)*} is _____.
        • a)
          DCFL
        • b)
          CFL but not DCFL
        • c)
          Non-CFL
        • d)
          None of the above
        Correct answer is option 'A'. Can you explain this answer?

        Shail Kulkarni answered
        Is the set of all strings that have the form WbcWR, where W is any string, b is a single 'b' character, c is a single 'c' character, and WR is the reverse of W.

        For example, the string "abcba" would be in L because W = "a" and WR = "a", so WbcWR = "abcba". Similarly, the string "xyzbcbazyx" would also be in L because W = "xyz" and WR = "zyx", so WbcWR = "xyzbcbazyx".

        However, the string "abcbazyx" would not be in L because there is no possible W such that WbcWR would result in "abcbazyx".

        In summary, L is the language of all strings that can be formed by taking any string, adding a 'b' and 'c' in between, and then adding the reverse of the original string.

        Chapter doubts & questions for Practice Test: Full Length - GATE Computer Science Engineering(CSE) 2025 Mock Test Series 2024 is part of Computer Science Engineering (CSE) exam preparation. The chapters have been prepared according to the Computer Science Engineering (CSE) exam syllabus. The Chapter doubts & questions, notes, tests & MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests here.

        Chapter doubts & questions of Practice Test: Full Length - GATE Computer Science Engineering(CSE) 2025 Mock Test Series in English & Hindi are available as part of Computer Science Engineering (CSE) exam. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.

        Top Courses Computer Science Engineering (CSE)

        Signup to see your scores go up within 7 days!

        Study with 1000+ FREE Docs, Videos & Tests
        10M+ students study on EduRev