GATE 2004 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2004

199 questions

MCQ 1991-mark 199

Questions 96–100 of 199

Q96Array1 markMCQ−0.33 if wrong
Two matrices M1 and M2 are to be stored in arrays A and B respectively. Each array can be stored either in row-major or column-major order in contiguous memory locations. The time complexity of an algorithm to compute M1 x M2 will be

Q97Stack1 markMCQ−0.33 if wrong
A program attempts to generate as many permutations as possible of the string, 'abcd' by pushing the characters a,b,c,d in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings CANNOT be generated using this program?

Q98Stack1 markMCQ−0.33 if wrong
Assume that the operators +, -, x , are left associative and ^ is right associative. the order of precedence (from highest to lowest) is ^, x , +, -. The postfix expression corresponding to the infix expression a + b x c-d^e^f is

Q99Stack1 markMCQ−0.33 if wrong
The best data structure to check whether an arithmetic expression has balanced parentheses is a

Q100Stack1 markMCQ−0.33 if wrong
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 top 2 (top1 <\lt top 2) 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