Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Computer Science – Data Structure

Rating
-
Sold
-
Pages
36
Grade
A+
Uploaded on
06-09-2024
Written in
2024/2025

Computer Science – Data Structure – 36 Pages – 55 Multiple Choice Questions with Answers – 15 Assertion & Reason Type Questions with Answers - Very Helpful for Students and Teachers

Institution
Course

Content preview

Name of the Chapter- DATA STRUCTURE



Question Question Content Learning Objective(if
No Provided)
Sl.No Question Learning Objective
1 What is the process of inserting data into a stack called? Knowledge
A. Create
B. Insert
C. Push
D. Evaluate
2 What is the process of deleting data from a stack called? Knowledge
A. Drop
B. Delete
C. Erase
D. Pop
3 Which data structure works on the principle of LIFO? Knowledge
A. Linear List
B. Stack
C. Queue
D. Tree
4 Which pointer is associated with a stack? Knowledge
A. First
B. Front
C. Rear
D. Top


5 Assume a stack has size 4. If a user tries to push a fifth Understanding
element to a stack, which of the mentioned condition will
arise?
A. Underflow
B. Overflow
C. Crash
D. Successful Insertion
6 If a user tries to pop an empty stack, which of the Understanding
mentioned condition will arise?
A. Empty data
B. Overflow

, C. Underflow
D. No error


7 Which of the following condition is necessary for Analysis
checking a stack st is full in Python?
A. Top ==len(st)
B. Top ==len(st)-1
C. Top < len(st)
D. Top ==st
8 Assume a stack Stk implemented as a list. Predict the Analysis
output of the following code.
def push_char(ch):
Stk.append(ch)
def display_stk():
strdata=""
if len(Stk)==0:
print("Empty Stack")
else:
for i in Stk:
strdata+=i
print(strdata[::-1])
push_char('c')
push_char('b')
push_char('s')
push_char('e')
push_char('2')
push_char('0')
push_char('2')
push_char('1')

A. 1202esbc
B. cbse2021
C. 1
D. s




9 Which of these is not an application of stack? Application
A. Parenthesis Balancing program

, B. Evaluating Arithmetic Expressions
C. Reversing Data
D. Data Transfer between Process
10 Predict the output of the following code: Application
def insert_data(stk,num):
stk.append(num)
stk=[2,3,4]
insert_data(stk,10)
print(stk)
A. [2,3,4,10]
B. [10,2,3,4]
C. Overflow
D. Underflow


11 Predict the output of the following code: Application
def push(stk,num):
stk.append(num)
def pop():
if len(stk)==0:
print(“Underflow”)
else:
stk.pop()
stk=[10,100,-1,2,4]
push(stk,200)
pop()
pop()
pop()
push(stk,4)
print(stk[-1])
A. 200
B. 100
C. -1
D. 4


12 The contents of a stack st are as shown in the figure. Analysis
Mention the value of Top after a series of these
operations:
Push(st,9)
Pop()

, Pop()
Pop()
Push(st,-1)




A. 1
B. 2
C. 3
D. 4
13 Choose correct output for the following sequence of Analysis
operations.
push(5)
push(8)
pop
push(2)
push(5)
pop
pop
pop
push(1)
pop
A. 8 5 2 51
B. 8 5 5 2 1
C. 8 2 5 5 1
D. 8 1 2 5 5
14 What is the value of the postfix expression 6 3 2 4 + – *? Evaluation
A. -18
B. 1
C. 40
D. 72
15 Which is the correct way to create a stack of numbers Creation
with contents 8,10 and 100, in Python?
A. Stack=(8,10,100)
B. Stack =[8,10,100]

Written for

Institution
Secondary school
School year
5

Document information

Uploaded on
September 6, 2024
Number of pages
36
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$3.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
kbzone

Get to know the seller

Seller avatar
kbzone ICSE
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
284
Last sold
-
Notes On All Subjects

A Store where Notes, Presentations, Questions &amp; Answers, Classnotes, Study mqaterials and Studyguides are available at a very nominal preice. The notes are very useful for both the Students and Teachers.

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions