1

GATE CSE 2004

MCQ (Single Correct Answer)

+1

-0.3

A single array A[1..MAXSIZE] is used to implement two stacks, The two stacks grow from opposite ends of the array. Variables top1 and top2 (top1 < top2) point to the location of the topmost element in each of the stacks, If the space is to be used efficiently, the condition for "stack full" is

2

GATE CSE 2000

MCQ (Single Correct Answer)

+1

-0.3

An n $$\times$$ n array v is defined as follows V [i, j] = i - j for all i, j, $$1 \le i \le n,\,1 \le j \le n$$ The sum of the elements of the array v is

3

GATE CSE 2000

MCQ (Single Correct Answer)

+1

-0.3

Suppose you are given an array s[1..n] and a procedure reverse (s, i, j) which reverse the order of elements in s between positions i and j (both inclusive). What does the following sequence do, where $$1 \le k < n:$$ reverse (s, 1, k);

reverse (s, k+1, k);

reverse (s, 1, n);

reverse (s, k+1, k);

reverse (s, 1, n);

Questions Asked from Arrays (Marks 1)

Number in Brackets after Paper Indicates No. of Questions

GATE CSE Subjects

Discrete Mathematics

Programming Languages

Theory of Computation

Operating Systems

Computer Organization

Database Management System

Data Structures

Computer Networks

Algorithms

Compiler Design

Software Engineering

Web Technologies

General Aptitude