How To Exam?

a knowledge trading engine...


Indian Institute of Technology Madras (IIT-M) 2000 A.M.I.E.T.E Computer Science

Wednesday, 23 January 2013 04:25Web
(b) A structure of two fields, every field being a pointer to an array of 10 elements
(c) A structure of three fields: an integer, a float, and an array of 10 elements
(d) An array, every element of which is a structure of kind node
1.11 The most improper matching for the subsequent pairs
X: m=malloc(5); m= NULL; 1: using dangling pointers
Y: free(n); n->value=5; 2: using uninitialized pointers
Z: char *p; *p’a’; 3. lost memory is:
(a) X—1 Y—3 Z-2
(b) X—2 Y—1 Z-3
(C) X—3 Y—2 Z-1
(d) X—3 Y—1 Z-2
1.12 The most improper matching for the subsequent pairs
X: depth 1st search 1: heap
Y: breadth-first search 2: queue
Z: sorting 3: stack
is:
(a) X—1 Y—2 Z-3
(b) X—3 Y—1 Z-2
(c) X—3 Y—2 Z-1
(d) X—2 Y—3 Z-1
1.13 Consider the subsequent nested representation of binary trees: (X Y Z) shows Y and Z
are the left and right sub stress, respectively, of node X. Note that Y and Z
may be NULL, or further nested. Which of the subsequent represents a valid binary
tree?
(a) (1 two (4 five six 7))
(b) (1 (2 three 4) five 6) 7)
(c) (1 (2 three 4)(5 six 7))
(d) (1 (2 three NULL) (4 5))
1.14 Let s be a sorted array of n integers. Let t(n) denote the time taken for the most efficient
algorithm to determined if there are 2 elements with sum less than 1000 in s. which of the
subsequent statements is true?
(a) t (n) is 0(1)
(b) n t(n) n log2 n
(c) n log2 n t(n)
(d) t(n) =
1.15 Aliasing in the situation of programming languages refers to
(a) multiple variables having the identical memory location
(b) multiple variables having the identical value
(c) multiple variables having the identical identifier
(d) multiple uses of the identical variable
1.16 presume that objects of the kind short, float and long occupy two bytes, four bytes and 8
bytes, respectively. The memory requirement for variable t, ignoring alignment
considerations, is
(a) 22 bytes
(b) 14 bytes
(c) 18 bytes
(d) 10 bytes
1.17 The number of tokens in the subsequent C statement
printf(”i=%d, &%i”,i,&i); is
(a) 3
(b) 26



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Indian Institute of Technology Madras (IIT-M) 2000 A.M.I.E.T.E Computer Science