• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2003

Question 81

A 2 km long broadcast LAN has 107 bps bandwidth and uses CSMA/CD. The signal travels along the wire at 2 × 108 m/s. What is the minimum packet size that can be used on this network?

  • 50 bytes

  • 100 bytes

  • 200 bytes

  • None of these

Question 82

Host A is sending data to host B over a full duplex link. A and B are using the sliding window protocol for flow control. The send and receive window sizes are 5 packets each. Data packets (sent only from A to B) are all 1000 bytes long and the transmission time for such a packet is 50 µs. Acknowledgement packets (sent only from B to A) are very small and require negligible transmission time. The propagation delay over the link is 200 us. What is the maximum achievable throughput in this communication?
  • A
  • B
  • C
  • D

Question 83

Consider the following functional dependencies in a database:
  Data_of_Birth → Age
  Age → Eligibility
  Name → Roll_number
  Roll_number → Name
  Course_number → Course_name
  Course_number → Instructor
  (Roll_number, Course_number) → Grade
The relation (Roll_number, Name, Date_of_birth, Age) is:
  • In second normal form but not in third normal form
  • In third normal form but not in BCNF
  • In BCNF
  • None of the above

Question 84

Consider the set of relations shown below and the SQL query that follows.
Students: (Roll_number, Name, Date_of_birth)
  Courses: (Course number, Course_name, Instructor)
  Grades: (Roll_number, Course_number, Grade)
 select distinct Name
         from Students, Courses, Grades
         where Students. Roll_number = Grades.Roll_number
              and Courses.Instructor = Korth
              and Courses.Course_number = Grades.Course_number
              and Grades.grade = A
Which of the following sets is computed by the above query?
  • Names of students who have got an A grade in all courses taught by Korth
  • Names of students who have got an A grade in all courses
  • Names of students who have got an A grade in at least one of the courses taught by Korth
  • None of the above

Question 85

Consider three data items D1, D2 and D3 and the following execution schedule of transactions T1, T2 and T3. In the diagram, R(D) and W(D) denote the actions reading and writing the data item D respectively. GATECS2003Q87 Which of the following statements is correct?
  • The schedule is serializable as T2; T3; T1
  • The schedule is serializable as T2; T1; T3
  • The schedule is serializable as T3; T2; T1
  • The schedule is not serializable

Question 86

In the following C program fragment, j, k n and TwoLog_n are integer variables, and A is an array of integers. The variable n is initialized to an integer ≥ 3, and TwoLog_n is initialized to the value of 2*⌈log2(n)⌉ 

C
for (k = 3; k < = n; k++)
    A[k] = 0;
for (k = 2; k < = TwoLog_n; k++)
    for (j = k + 1; j < = n; j++)
        A[j] = A[j] || (j % k);
for (j = 3; j < = n; j++)
    if (!A[j]) printf(\"%d\", j);

The set of numbers printed by this program fragment is

  • {m | m ≤ n, (∃ i) [m = i!]} Here i! mean factorial of i

  • {m | m ≤ n, (∃ i) [m = i2]}

  • {m | m ≤ n, m is prime}

  • Last print never executes

Question 87

Consider the C program shown below.
C
#include <stdio.h>
#define print(x) printf(\"%d \", x)
int x;
void Q(int z)
{
    z += x;
    print(z);
}
void P(int *y)
{
    int x = *y + 2;
    Q(x);
    *y = x - 1;
    print(x);
}
main(void)
{
    x = 5;
    P(&x);
    print(x);
}
The output of this program is
  • 12 7 6

  • 22 12 11

  • 14 6 6

  • 7 6 6

Question 88

Consider the function f defined below. C
struct item
{
    int data;
    struct item * next;
};
int f(struct item *p)
{
    return ((p == NULL) || (p->next == NULL) ||
            ((P->data <= p->next->data) &&
            f(p->next)));
}
For a given linked list p, the function f returns 1 if and only if
  • the list is empty or has exactly one element
  • the elements in the list are sorted in non-decreasing order of data value
  • the elements in the list are sorted in non-increasing order of data value
  • not all elements in the list have the same data value.

Question 89

The cube root of a natural number n is defined as the largest natural number m such that m3 ≤ n. The complexity of computing the cube root of n (n is represented in binary notation) is:
  • O(n) but not O(n0.5)
  • O(n0.5) but not O((log n)k) for any constant k > 0
  • O((log n)k) for some constant k > 0, but not O ((log log n)m) for any constant m > 0
  • O((log log n)m) for some constant k > 0.5, but not O((log log n)0.5)

There are 89 questions to complete.

Last Updated :
Take a part in the ongoing discussion