DSF Assignment 1 & 2
DSF Assignment 1 & 2
Q.1) Convert the following expression from infix to postfix and prefix. Mention the stack
contents at every step. 2*3/(2-1)+5*3 (DEC 2018,MAY2019-6 Marks)
Q.2) If the values of A, B, C and D are 2, 3, 4 & 5 resp. Calculate the value of following
postfix expressions using stack. (i) AB*C-D+ (ii) ABC+*D- (MAY 2019-6 Marks)
Q.3) State any three stack applications and write a C++ program to evaluate prefix
expression. (MAY 2011-6 Marks)
Q.4) Write a C++ program to convert infix to postfix expression. (MAY 2018-6 Marks)
Q.5) Write a C++ program to represent queue as linked organization. (MAY 2014-6 Marks)
Q.6) Consider circular queue of size 5 as - - A C -. Show the queue contents as
a. F is added to queue
b. Two letters are deleted
c. K, L, M are added.
d. One letter is deleted
e. R is added .
f. S is added. (MAY 2014-6 Marks)
Sinhgad Institute of Technology, Lonavala
Name of Students: Class (Div):S.E. (IT) Roll No.
Subject: DSF Date: