The procedure given below is required to find and replace certain characters inside an input character string supplied in array A. The characters to be… Read More
Tag Archives: GATE-CS-2013
Consider the same data as above question. What is the minimum number of registers needed in the instruction set architecture of the processor to compile… Read More
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands… Read More
(A) A (B) B (C) C (D) D Answer: (A) (D) Explanation: Given statement is : ¬ ∃ x ( ∀y(α) ∧ ∀z(β) )… Read More
A RAM chip has a capacity of 1024 words of 8 bits each (1K × 8). The number of 2 × 4 decoders with enable… Read More
Consider an instruction pipeline with five stages without any branch prediction: Fetch Instruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) and Write… Read More
Which of the following is NOT a common operation in a queue data structure? (A) Enqueue (B) Dequeue (C) Peek (D) Shuffle Answer: (D)Explanation: Shuffle… Read More
The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is… Read More
What is the return value of f(p,p), if the value of p is initialized to 5 before the call? Note that the first parameter is… Read More
Which of the following is/are undecidable? (A) 3 only (B) 3 and 4 only (C) 1, 2 and 3 only (D) 2 and 3 only… Read More
Consider the following two sets of LR(1) items of an LR(1) grammar. X -> c.X, c/d X -> .cX, c/d X -> .d, c/d X… Read More
A certain computation generates two arrays a and b such that a[i]=f(i) for 0 ≤ i < n and b[i]=g(a[i]) for 0 ≤ i <… Read More
The following figure represents access graphs of two modules M1 and M2. The filled circles represent methods and the unfilled circles represent attributes. If method… Read More
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment… Read More
Determine the maximum length of the cable (in km) for transmitting data at a rate of 500 Mbps in an Ethernet LAN with frames of… Read More