CSC 322 Lab 1
Objectives
- Learn C (not C++)
- Start to learn Linux and vi
- Implement stacks and queues
- Use arrays and linked lists
Problem
Write a C program that converts a base 10 number to binary using two methods: repeat division (using a stack) and subtraction (using a queue).
Note: there are many ways (and very sufficient and/or succinct algorithms) to do this. These are
NOT the allowable ways to do this. You MUST use the algorithms covered in class! The goals are to learn C, stacks, queues, and linked lists.
Details
- Guesstimate how long this lab will take and record it.
- Write out the algorithm for the problem. Do NOT use a UML diagram! This is not object oriented programming!
- Create a linux virtual machine
- For this assignment, you will be doing command line only and using vi. These are skills that will help you. Refer to aids given in class
- Following the examples in class:
- Create a stack implementation using a linked list
- Create a queue implementation using an array
- Use the stack and queue to covert the integer (gotten from the user or command line if you wish)
- Create a Software Development Report
- include a discussion on the fragility of your program in the security report
- Create a zip folder with all .c, .o, makefile, and SDR and submit it via Canvas