CSE21P6 - Data Structure Lab¶
Stack and Queue¶
Term 161¶
Exp 1. Write a program to implement different operations of queue.
Exp 5. Consider the following stack, where STACK is allocated N = 6 memory cells with following data items:
STACK: MAN, WOMAN, CHILD, KIDS, FATHER, MOTHER.
Now write a C program to implement the stack using linked list concept for the following operations.
POP(STACK, ITEM).POP(STACK, ITEM).PUSH(STACK, BROTHER).PUSH(STACK, SISTER).
Term 171¶
Exp 4. Write a program in C to implement the following operation of stack:
- PUSH
- POP
- Display
Term 191¶
Exp 7. Write a program in C to implement the following operation of stack:
- PUSH
- POP
- Display
Term 201¶
Exp 5. Write a program to implement stack using array data structure.
Exp 10. Given an array arr[] of size N, enqueue the elements of the array into a queue and then dequeue them.
Input:
Output:
Your task:
You don't need to read any input. Your task is to complete the functions push() and pop(). The function push() takes the array and its size as the input parameters and returns the queue formed, and the function pop(), takes the queue as the input parameter and prints the elements of the queue.
Term 211¶
Exp 3. Write a program in C to implements the following operations of stack:
- PUSH
- POP
- Display
Exp 4. Design, Develop and Implement a menu driven program in C for the following operations on Circular QUEUE of Characters (support the program with appropriate functions for each of the operations)
- Insert an Element on to Circular QUEUE.
- Delete an Element from Circular QUEUE.
- Demonstrate Overflow and Underflow situations on Circular QUEUE.
- Display the status of Circular QUEUE.