Programming and Data Structures (GATE Computer Science): Questions 149 - 151 of 151

Get 1 year subscription: Access detailed explanations (illustrated with images and videos) to 913 questions. Access all new questions we will add tracking exam-pattern and syllabus changes. View Sample Explanation or View Features.

Rs. 450.00 or

Question number: 149

» Programming and Data Structures » Stacks

MCQ▾

Question

The best data structure to check whether an arithmetic expression has balanced parentheses is a

Choices

Choice (4) Response

a.

Statck

b.

Tree

c.

Queue

d.

All of the above

Question number: 150

» Programming and Data Structures » Functions

MCQ▾

Question

The tightest lower bound on the number of comparisons, in the worst ease, for comparison-based sorting is of the order of

Choices

Choice (4) Response

a.

n log2 n

b.

n 2

c.

n log n

d.

n

Question number: 151

» Programming and Data Structures » Programming in C

MCQ▾

Question

  1. main() {
  2.     int i = 3;
  3.     switch (i) {
  4.         defaultprintf(“zero”);
  5.         case 1:
  6.                 printf(“one”);
  7.             break;
  8.         case 2:
  9.                 printf(“two”);
  10.             break;
  11.         case 3:
  12.                 printf(“three”);
  13.             break;
  14.     }
  15. }

Choices

Choice (4) Response

a.

three

b.

two

c.

one

d.

None of the above

f Page
Sign In