GATE 2012 Computer Science Questions With Solutions
1. An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be
main ()
{
int x, y, m, n ;
scanf (“%d %d”, &x, &y); / * Assume x > 0 and y > 0 * /
m = x; n = y ;
while ( m ! = n)
{
if (m > n)
m = m + n;
else n = n – m ;
}
printf(“%d”,n);
}
The program computes
9. Consider the following C function:
int f (int n)
{
static int i = 1;
if (n >= 5)
return n;
n = n + i;
i++;
return f (n);
}
The value returned by f(1) is
The highest normal form of this relation scheme is:
Support your answers with explanation.
- 255.255.0.0
- 255.255.252.0
- 255.255.128.0
- 255.255.64.0
- More than 12
- Less than 8
- 12
- 8
- 24
- 26
- 27
- 25
- page size
- physical memory size
- the instruction set architecture
- number of processes in memory
- list
- tree
- stack
- queue
- 464
- 94
- 416
- 512
main ()
{
int x, y, m, n ;
scanf (“%d %d”, &x, &y); / * Assume x > 0 and y > 0 * /
m = x; n = y ;
while ( m ! = n)
{
if (m > n)
m = m + n;
else n = n – m ;
}
printf(“%d”,n);
}
The program computes
- x mod y using repeated subtraction
- the greatest common divisor of x and y
- the least common multiple of x and y
- x + y, using repeated subtraction
- the instruction set architecture
- physical memory size
- page size
- number of processes in memory
9. Consider the following C function:
int f (int n)
{
static int i = 1;
if (n >= 5)
return n;
n = n + i;
i++;
return f (n);
}
The value returned by f(1) is
- 5
- 8
- 6
- 7
- 10,8,7,3,2,1,5
- 10,8,7,5,3,2,1
- 10,8,7,1,2,3,5
- 10,8,7,2,3,1,5
- 2
- 4
- 3
- 6
The highest normal form of this relation scheme is:
- name, courseNo -> grade
- rollNo, courseNo -> grade
- rollNo -> name
- name -> rollNo
Support your answers with explanation.
Replies
You are reading an archived discussion.
Related Posts
CEans,
We've discussed this topic many times in the past but never had a proper action plan. Why don't we form groups and distribute the topics related to our domains...
Jaipur, July 28, 2011: Queppelin, the end to end mobile application development organisation for all the prominent mobile application platforms, organized a Developer meet this Weekend in Jaipur to nurture...
Finally, a wireless, audiophile-grade home theater system that doesn't need a receiver!
Up until now, wireless home theater speaker systems have been difficult to set up, or haven’t had the...
Problem of system giving sound when booting but does not display
What are the disadvantages of the conventional intercom system?