Data Types and Structures

What is a record?

    A record is a composite data type that groups together related data items possibly from different data types into a single unit.


Files

Why files are needed


Introduction to abstract Datatypes (ADT)

    It is a collection of data and a set of operation on those data.

Examples of ADTs; Stack, queue, linked list.

Stack - a list containing several items operating on the last in, first out (LIFO) principle. Items can be added to the stack (push) and removed from the stack (pop). The first item added to a stack is the last item to be removed from the stack.

Queue - a list containing several items operating on the first in, first out (FIFO) principle. Items can be added to the queue (enqueue) and removed from the queue (dequeue). The first item added to a queue is the first item to be removed from the queue.

linked list - a list containing several items in which each item in the list points to the next item in the list. In a linked list a new item is always added to the start of the list


What is a subroutine?

    it is a self-contained program that performs specific tasks as part of the main program routine and is referenced by a name

What is a procedure?

    A procedure is a subroutine that may or may not return a value back to its program from which it was called.

What is a function?

    A function is a sub-program that performs a specific task and always returns a value to the part of the program from which it was called.