![]() |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() |
![]() |
![]() |
![]() ![]() |
Author | Message |
Neha Agarwal
Groupie ![]() Joined: 04Jan2007 Online Status: Offline Posts: 59 |
![]() ![]() ![]() Posted: 05Jan2007 at 5:17pm |
1. Consider the following nested representation of binary trees: (X Y Z) indicates Y and Z are the left and right sub trees, respectively, of node X Note that Y and Z may be NULL, or further nested. Which of the following represents a valid binary tree?
2. Let s be a sorted array of n integers. Let t (n) denote the time taken for the most efficient algorithm to determine if there are two elements with sum less than 1000 in s. Which of the following statements is true?
3. Aliasing in the context of programming languages refers to
4. Consider the following C declaration struct { short s [5] union { float y; long z; }u; } t; Assume that objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment considerations, is (a) 22 bytes (b) 14 bytes (e) 18 bytes (d) 10 bytes
5. The number of tokens in the following C statement printf("i=%d, &i= %x", i, &i); is
6. Which of the following derivations does a top-down parser use while parsing an input string? The input is assumed to be scanned in left to right order. (a) Leftmost derivation (b) Leftmost derivation traced out in reverse (c) Rightmost derivation (d) Rightmost derivation traced out in reverse
7. Which of the following need not necessarily be saved on a context switch between processes?
8. Let m [0]….m [4] be mutexes (binary semaphores) and P [0] ... P [4] be processes. Suppose each process P executes the following : wait (m ); wait (m [(i + 1) mode 4]); …….. release (m ) ; release (m[(i + 1) mod 4 ] ); This could cause
9. B + -trees are preferred to binary trees in databases because
10. Given the relations employee (name, salary, deptno), and department (deptno, deptname, address) . which of the following queries cannot be expressed using the basic relational algebra operations ( s , p , ´ , |X|, È , Ç , - )? (a) Department address of every employee (b) Employees whose name is the same as their department name (c) The sum of all employee salaries (d) All employees of a given department |
|
For more papers visit:
http://onestopgate.com/gate-preparation// Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
![]() |
|
![]() ![]() |
||
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
|
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.