CBSE Class 12 Computer Science Data Structures Assignment

Read and download free pdf of CBSE Class 12 Computer Science Data Structures Assignment. Get printable school Assignments for Class 12 Computer Science. Class 12 students should practise questions and answers given here for Data Structures Computer Science in Class 12 which will help them to strengthen their understanding of all important topics. Students should also download free pdf of Printable Worksheets for Class 12 Computer Science prepared as per the latest books and syllabus issued by NCERT, CBSE, KVS and do problems daily to score better marks in tests and examinations

Assignment for Class 12 Computer Science Data Structures

Class 12 Computer Science students should refer to the following printable assignment in Pdf for Data Structures in Class 12. This test paper with questions and answers for Class 12 Computer Science will be very useful for exams and help you to score good marks

Data Structures Class 12 Computer Science Assignment

Short Answer Type Questions :

Question. Convert the following infix expression to its equivalent postfix expression. Showing stack  contents for the conversion
                     (A + B * (C − D)/E)
Answer: Given infix expression is
                     (A + B * (C − D)/E)

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-1

Output ABCD −*E/+

Question. Consider the following stack of characters, where STACK is allocated N = 8 memory cells.
                           STACK : A, C, D, F, K, …, …, …
Describe the STACK at the end of the following operations. Here, Pop and Push are algorithms for  deleting and adding an element to the stack.
(i) Pop (STACK, ITEM)      (ii) Pop (STACK, ITEM)
(iii) Push (STACK, L)       (iv) Push (STACK, P)
(v) Pop (STACK, ITEM)    (vi) Push (STACK,R)
(vii) Push (STACK, S)     (viii) Pop (STACK, ITEM)
Answer: The stack contents will be as follows after the operations of stack
(i) STACK : A, C, D, F             (ii) STACK : A, C, D
(K is deleted)                             (F is deleted)
(iii) STACK : A, C, D, L           (iv) STACK: A, C, D, L, P
(L is inserted)                             (P is inserted)
(v) STACK : A, C, D, L            (vi) STACK : A, C, D, L, R
(P is deleted)                               (R is inserted)
(vii) STACK : A, C, D, L, R, S
(S is inserted)
(viii) STACK : A, C, D, L, R
(S is deleted)

Question. Evaluate the following postfix expression using a stack. Show the contents of stack after execution of each operation:
                  10, 40, 25, −, *, 15, 4, *, +
Answer: Given postfix expression is
                  10, 40, 25, −, *, 15, 4, *, +

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-2

Output 210

Question. Obtain the postfix notation for the following infix notation of expression showing the contents of the stack and postfix expression formed after each step of conversion:
                 (A * B + (C − D/F))
Answer: Given infix expression is
                 (A * B + (C − D/F))

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-3

Output AB*CDF/–+

Question. Evaluate the following postfix notation of expression
                True, False, NOT, AND, True, True, AND, OR
Answer: Given postfix expression is
                True, False, NOT, AND, True, True, AND, OR

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-4

Output True

Question. Evaluate the following postfix expression. Show the status of stack after execution of each operation :
              25, 8, 3, −, /, 6, *, 10, +
Answer: Given postfix expression is
              25, 8, 3, −, /, 6, *, 10, +

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-5

Output 40

Question. Change the following infix expression into postfix expression :
               ((A + B) * C + D/E − F)
Answer: Given infix expression is
               ((A + B) * C + D/E − F)

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-6

Output AB+C*DE/+F–

Question. Evaluate the following postfix notation. Show status of stack after every step of evaluation (i.e. after each operator).
                 True, False, NOT, AND, False, True, OR, AND
Answer: Given postfix expression is
                True, False, NOT, AND, False, True, OR, AND

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-7

Output True

Question. Evaluate the following postfix expression. Show the status of stack after execution of each operation :
             20, 10, +, 5, 2, *, −, 10, /
Answer: Given postfix expression is
            20, 10, +, 5, 2, *, −, 10, /

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-8

Output 2

Question. Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation :
                  100, 40, 8, +, 20, 10, −, +, *
Answer: Given postfix expression is
                  100, 40, 8, +, 20, 10, −, +, *

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-9

Output 5800

Question. Suppose STACK is allocated 6 memory locations and initially STACK is empty (Top = 0).
Given the output of the program segment.
AAA = 4
BBB = 6
Push (STACK, AAA)
Push (STACK, 4)
Push (STACK, BBB +2)
Push (STACK, AAA + BBB)
Push (STACK, 10)
while (Top>0) :
                Element = STACK. Pop ( )
                print(Element)
Answer: Output
10
10
8
4
4

Question. Evaluate the following postfix expression. Show the status of stack after execution of each operation :
                  10, 20, +, 25, 15, −, *, 30, /
Answer: Given postfix expression is
                  10, 20, +, 25, 15, −, *, 30, /

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-10

Output 10

Question. Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation :
                      5, 6, 9, +, 80, 5, *, −, /
Answer: Given postfix expression is
                      5, 6, 9, +, 80, 5, *, −, /

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-11

Output −1 / 77

Question. What is data structure ? Name any two non-primitive data structures.
Answer: Data structure is a way of storing and organising information in the computer, so that it can be retrieved and used most productively. Two non-primitive data structures are array and linked list. 

Question. Evaluate the following postfix expression. Show the status of stack after execution of each operation.
                  60, 6, /, 5, 2, *, 5, −, +
Answer: Given postfix expression is
                 60, 6, /, 5,2, *, 5, −, +

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-12

Output 15

Question. Consider the following sequence of numbers:
1, 2, 3, 4
These are supposed to be operated through a stack to produce the following sequence of numbers:
2, 1, 4, 3
List the Push and Pop operations to get the required output.
Answer: (i) Push (1) (ii) Push (2)
(iii) Pop (2)       (iv) Pop (1)
(v) Push (3)      (vi) Push (4)
(vii) Pop (4)     (viii) Pop (3)

Question. What is the value of the postfix expression?
6 3 2 4 + − *
Answer: Postfix expression is : (6 * (3 − (2 + 4)))
= (6 * (3 − 6))
= (6 * (−3)) = − 18

Question. Evaluate the following postfix expression using stack and show the contents of stack after execution of each expression.
                 120, 45, 20, +, 25, 15, −, +, *
Answer: Given postfix expression is
                 120, 45, 20, +, 25, 15, −, +, *

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-13

Output 9000

Question. Write the applications of stack.
Answer: There are some applications of stack are as follows
(i) Infix to postfix conversion using stack.
(ii) Evaluation of postfix expression.
(iii) Reverse a string using stack.
(iv) Implement two stacks in an array.

Question. Use a stack to evaluate the following postfix expression and show the content of the stack after execution of each operation. Do not write any code.  Assume as if you are using Push and Pop member methods of the stack.
                          AB − CD + E * +
(where A = 5, B = 3, C = 5, D = 4 and E = 2)
Answer: Putting the values of the operands, we get the postfix expression as
                        5, 3, −, 5, 4, +, 2, *, +

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-14

Output 20

Question. Evaluate the following postfix expression. Show the status of stack after execution of each operation separately.
                    T, F, NOT, AND, T, OR, F, AND
Answer: Given postfix expression is
                    T, F, NOT, AND, T, OR, F, AND

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-15

Output F

Question. Evaluate the following postfix expression:
                    20, 10, −, 15, 3, /, +, 5, *
Answer: Given postfix expression is

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-16

Output 75

Question. Define any two operations on data structure.
Answer: Two operations on data structure are as follows
(i) Insertion It means addition of a new data element in a data structure.
(ii) Searching It involves searching for the specific data element in a data structure.

Question. Evaluate the following postfix using stack and show the content of the stack after the execution of each.
                 20, 4, +, 3, −, 7, /
Answer: Given postfix expression is
                 20, 4, +, 3, −, 7, /

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-17

Output 3

Question. Evaluate the following postfix expression using a stack. Show the contents of stack after execution of each operation.
True, False, True, False, NOT, OR, True, OR, OR, AND
Answer: In the given expression True and False are operands and AND, NOT and OR are operators.

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-18

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-19

Output True

Long Answer Type Questions :

Question. Find the output of the following code
answer=[]; output=‘’
answer.append(‘T’)
answer.append(‘A’)
answer.append(‘M’)
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
print(‘Result=’,output)
Answer: answer is a blank list and output is a blank string. The three append operatins add T→A→ M into the stack with M at the top. First Pop operation takes out ‘M’ and adds it to ‘ch’ and then ‘output’. Similarly, the subsequent pop operations are popping out ‘A’ and ‘T’ and adding them to output, which is printed as ‘MAT’.
Output Result = MAT

Question. Write the Push operation of stack containing person names. Notice that the name should only accept characters, spaces and period (.) except digits. Assume that Pname is a class instance  attribute.
Answer: 

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-26

Question. Change the following infix expression into postfix expression
                    (A + (B*C) −D/ E+C^H
Answer: Given infix expresion is
                   (A + (B*C) −D/ E+C ^H

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-23

Output ABC*+DE/− CH^+

Question. Write Push (contents) and Pop (contents) methods in Python to add numbers and remove numbers  considering them to act as Push and Pop operations of stack.
Answer: 

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-22

Question. Convert the expression given below from infix to postfix using stack , showing each operation.
                       (A + B/(C * D)-E)
Answer: Given infix expression is
                       (A + B/(C * D)-E)

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-21

Output ABCD*/+E−

Question. Explain the different operations possible in a stack.
Answer: The stack provides three major operaions, which are as follows
(i) Push
(ii) Pop
(iii) Traversal
(i) Push Operation Whenever we add any element ‘‘data’’ in the list, then it will be called as ‘Push  operation’ on stack.
Before every Push operation, the value of ‘‘Top’’ is incremented by one and then value is inserted at the  top of the stack.
(ii) Pop Operation Whenever we try to remove elements from the stack, then the operation is called as ‘Pop operation’ on stack.
After every Pop operation, the value of ‘‘Top’’ is decremented by one and then value is deleted from the top of the stack.
(iii) Traversal Operation The traversal operation means traversing through the elements of the stack  starting from the 1st element to the last. It does not involve any modifications to the contents of the  stack.

Question. Evaluate the following postfix expression using stack, showing stack 7 8 2 * 4 / + status after execution of each operation.
Answer: Given postfix expresion is
7 8 2 * 4/+

CBSE-Class-12-Computer-Science-Data-Structures-Assignment-20

Output 11

Question. A linear stack called status contains the following information :
(i) Phone number of Employee
(ii) Name of Employee
Write the following methods to perform given operations on the stack status :
(i) Push_element ( ) To Push an object containing Phone number of Employee and Name of Employee into the stack.
(ii) Pop_element ( ) To Pop an object from the stack and to release the memory.
Answer: 

CBSE-Class-12-Computer-Science-Data-Structures-Assignment

Other Chapters
CBSE Class 12 Computer Science Boolean Logic Concepts
CBSE Class 12 Computer Science Concept of Networking Assignment
CBSE Class 12 Computer Science Constructors And Destructors Concepts
CBSE Class 12 Computer Science Data File Handling In C++ Concepts
CBSE Class 12 Computer Science Data Structures Assignment
CBSE Class 12 Computer Science Data Structures Concepts
CBSE Class 12 Computer Science Data Visualization Using Pyplot Assignment
CBSE Class 12 Computer Science Database Concepts Assignment
CBSE Class 12 Computer Science Database And SQL Concepts
CBSE Class 12 Computer Science E Governance Assignment
CBSE Class 12 Computer Science File Handling in Python Assignment
CBSE Class 12 Computer Science Functions In Python Assignment
CBSE Class 12 Computer Science Fundamentals of Computer Concepts
CBSE Class 12 Computer Science Idea Of Efficiency Assignment
CBSE Class 12 Computer Science Inheritance Concepts
CBSE Class 12 Computer Science Interface Python with SQL Assignment
CBSE Class 12 Computer Science Introduction and Basics of Computers Assignment
CBSE Class 12 Computer Science Library Functions Assignment
CBSE Class 12 Computer Science Object Oriented Programming Concepts
CBSE Class 12 Computer Science Pointers Concepts
CBSE Class 12 Computer Science Programming In C++ Concepts
CBSE Class 12 Computer Science Revision Of The Basics Of Python Assignment
CBSE Class 12 Computer Science Society Law And Ethics Assignment
CBSE Class 12 Computer Science Strings Assignment
CBSE Class 12 Computer Science Structured Query Language SQL Assignment
CBSE Class 12 Computer Science User Defined Functions Assignment
CBSE Class 12 Computer Science Window Movie Maker I Assignment
CBSE Class 12 Computer Science Window Movie Maker II Assignment

CBSE Class 12 Computer Science Data Structures Assignment

We hope you liked the above assignment for Data Structures which has been designed as per the latest syllabus for Class 12 Computer Science released by CBSE. Students of Class 12 should download and practice the above Assignments for Class 12 Computer Science regularly. We have provided all types of questions like MCQs, short answer questions, objective questions and long answer questions in the Class 12 Computer Science practice sheet in Pdf. All questions have been designed for Computer Science by looking into the pattern of problems asked in previous year examinations. You can download all Revision notes for Class 12 Computer Science also absolutely free of cost. Lot of MCQ questions for Class 12 Computer Science have also been given in the worksheets and assignments for regular use. All study material for Class 12 Computer Science students have been given on studiestoday. We have also provided lot of Worksheets for Class 12 Computer Science which you can use to further make your self stronger in Computer Science.

What are benefits of doing Assignment for CBSE Class 12 Computer Science Data Structures?

a. Score higher marks: Regular practice of Computer Science Class 12 Assignments for chapter Data Structures will help to improve understanding and help in solving exam questions correctly.
b. As per CBSE pattern: All questions given above follow the latest Class 12 Computer Science Sample Papers so that students can prepare as per latest exam pattern.
c. Understand different question types: These assignments include MCQ Questions for Class 12 Computer Science with answers relating to Data Structures, short answers, long answers, and also case studies.
d. Improve time management: Daily solving questions from Data Structures within a set time will improve your speed and accuracy.
e. Boost confidence: Practicing multiple assignments and Class 12 Computer Science mock tests for Data Structures reduces exam stress.

How to Solve CBSE Class 12 Computer Science Data Structures Assignment effectively?

a. Start with Class 12 NCERT and syllabus topics: Always read the chapter carefully before attempting Assignment questions for Class 12 Computer Science Data Structures.
b. Solve without checking answers: You should first attempt the assignment questions on Data Structures yourself and then compare with provided solutions.
c. Use Class 12 worksheets and revision notes: Refer to NCERT Class 12 Computer Science worksheets, sample papers, and mock tests for extra practice.
d. Revise tricky topics: Focus on difficult concepts by solving Class 12 Computer Science MCQ Test.
e. Maintain notebook: Note down mistakes in Data Structures assignment and read them in Revision notes for Class 12 Computer Science

How to practice CBSE Class 12 Computer Science Data Structures Assignment for best results?

a. Solve assignments daily: Regular practice of Data Structures questions will strengthen problem solving skills.
b.Use Class 12 study materials: Combine NCERT book for Class 12 Computer Science, mock tests, sample papers, and worksheets to get a complete preparation experience.
c. Set a timer: Practicing Class 12 Computer Science Data Structures assignment under timed conditions improves speed and accuracy.

Where can I download in PDF assignments for CBSE Class 12 Computer Science Data Structures

You can download free Pdf assignments for CBSE Class 12 Computer Science Data Structures from StudiesToday.com

How many topics are covered in Data Structures Computer Science assignments for Class 12

All topics given in Data Structures Computer Science Class 12 Book for the current academic year have been covered in the given assignment

Is there any charge for this assignment for Data Structures Computer Science Class 12

No, all Printable Assignments for Data Structures Class 12 Computer Science have been given for free and can be downloaded in Pdf format

Are these assignments for Data Structures Class 12 Computer Science designed as per CBSE curriculum?

Latest syllabus issued for current academic year by CBSE has been used to design assignments for Data Structures Class 12

Are there solutions or answer keys for the Class 12 Computer Science Data Structures assignments

Yes, we have provided detailed answers for all questions given in assignments for Data Structures Class 12 Computer Science