Case Based MCQ Questions

Computer Science - Class 12
Chapter 3 - Stacks

## Millions of computer science students have taken a  course on algorithms and data structures, typically  the second course after the initial one introducing  programming. One of the basic data structures in  such a course is the stack. The stack has a special  place in the emergence of computing as a science,  as argued by Michael Mahoney, the pioneer of the  history of the theory of computing. The Stack can  be used in many computer applications, few are  given below:   ## (adsbygoogle = window.adsbygoogle || []).push({});

(A) .append() (B) .insert() (C) .extend() (D) .append(Len(Country), N) ## (D) 2

Checking the options

• (A) 3 (B) 0 (C) –1 (D) 2 So, the correct answer is (D)

## (D) No of the above

Checking the options

• (A) Country=[] (B) Country. is Empty() (C) len(Country)==0

## (adsbygoogle = window.adsbygoogle || []).push({});

(D) No of the above

So, the correct answer is (C)

## (D) Country. delete(1)

Checking the options

• (A) pop(1) (B) pop()

## (adsbygoogle = window.adsbygoogle || []).push({});

(C) del country

## (adsbygoogle = window.adsbygoogle || []).push({});

(D) Country. delete(1)

## (adsbygoogle = window.adsbygoogle || []).push({});

So, the correct answer is (B)

## (D) def pop(Country)

Checking the options

• (A) pop(C) (B) pop(Country) (C) call pop(Country) (D) def pop(Country) So, the correct answer is (B) 