0% found this document useful (0 votes)
53 views2 pages

Ques Bank Unit-1,2 (CAT-1)

This document contains questions ranging from 2 to 8 marks related to data structures and algorithms. Some of the questions ask about operations on data structures like arrays and linked lists, ADTs, stacks, queues, recursion, and evaluating expressions in different notations. Other questions involve calculating memory addresses of array elements stored in different orders, transforming expressions between infix, postfix and prefix notations using stacks, and implementing stack operations using arrays.

Uploaded by

anmol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views2 pages

Ques Bank Unit-1,2 (CAT-1)

This document contains questions ranging from 2 to 8 marks related to data structures and algorithms. Some of the questions ask about operations on data structures like arrays and linked lists, ADTs, stacks, queues, recursion, and evaluating expressions in different notations. Other questions involve calculating memory addresses of array elements stored in different orders, transforming expressions between infix, postfix and prefix notations using stacks, and implementing stack operations using arrays.

Uploaded by

anmol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

2-mark questions

1. Explain the different operations to be performed on data structures.


2. What is the difference between Array and Linked list?
3. Evaluate the address of 5th index element in 1-D array if base address is 600 and the
data stored needs 3bytes of storage.
4. Each element of an array A[-20……….20, 10…….35] requires one byte of storage. If
the array is column major implemented & beginning of array is at location 500,
Determine the address of element at A[0][30].
5. What is ADT?
6. Define polish notation with an example.
7. Describe all type of linked list

5-mark questions
1. What is data structure? Classify data structure in its different types and explain them
with the help of diagram? Also, Explain time and space trade-off .
2. Apply the row major order formula to calculate the address of element at X[4,3] in a
2D array X[1..5][1..4] stored in a row major order. Assume base address=1000 and
each element requires 4 words of storage.
3. Consider the following infix expression:
A+(B*C-(D/E^F)*G)*H
Transform this expression into Postfix expression using stack.
4. Explain recursion with the help of an example.
5. Each element of an array Data[20][50] requires 4 Bytes of storage. Base address of data is
2000. Determine the location of Data[10][10], when the array is stored as
i) Row major
ii) Column major
6. Consider the linear arrays AAA[ 5:50], BBB[-5:10] and CCC[18].
i) Find the number of elements in each array.
ii) Suppose base address(AAA)=300 and w=4 words per memory cell for AAA.
Find the address of AAA[15], AAA[35] and AAA[55].
7. Suppose the following stack of integers is in memory where STACK is allocated N = 6
memory cells
TOP = 3 STACK: 5, 2, 3, _, _, _ ;
Find the output of the following program segments

1. Call POP (STACK, itemA)


Call POP (STACK, itemB)
Call PUSH (STACK, itemB+2)
Call PUSH (STACK,8)
Call PUSH (STACK, itemA + itemB)

2. repeat while TOP <>0


call POP (STACK, item)
print “ item”
8 Marks Questions

1. Write the applications of stack. Explain how can you reverse a string using stack with the help
of an example. Also write a C function for this.
2. What is singly linked list? What all operations can be applied on SLL? Write algorithm to
perform insertion and deletion operation on SLL.
3. Write the algorithm to evaluate a postfix expression. Write the steps to evaluate this
expression:
20 8 4 / 2 3 + * -
4. Give array implementation of stack data structure. Write functions to implement PUSH and
POP operations on stack.
5. Using algorithm convert the given infix expression into postfix expression.
a) ( A + B * C / D – E + F / G / ( H + I ) )
b) A * ( B + D ) / E – F * ( G + H / K )

You might also like