/monty

Stacks and queues - LIFO and FIFO

Primary LanguageC

0x19. C - Stacks, Queues - LIFO, FIFO

OBJECTIVES

  • What do LIFO and FIFO mean
  • What is a stack, and when to use it
  • What is a queue, and when to use it
  • What are the common implementations of stacks and queues
  • What are the most common use cases of stacks and queues
  • What is the proper way to use global variables
  • The goal of this project is to create an interpreter for Monty ByteCodes files

TASKS

  1. Implement the push (pushes an element to the stack) and pall (prints all the values on the stack, starting from the top of the stack) opcodes.
  2. Implement the pint opcode (prints the value at the top of the stack, followed by a new line).
  3. Implement the pop opcode (removes the top element of the stack).
  4. Implement the swap opcode (swaps the top two elements of the stack).
  5. Implement the add opcode (adds the top two elements of the stack).
  6. Implement the nop opcode (Doesn't do anything).