CSC 322 Lab 1

08 Jan 2025 - 21:03 | Version 1 |

Objectives

  1. Learn C (not C++)
  2. Start to learn Linux and vi
  3. Implement stacks and queues
  4. 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

  1. Guesstimate how long this lab will take and record it.
  2. Write out the algorithm for the problem. Do NOT use a UML diagram! This is not object oriented programming!
  3. Create a linux virtual machine
    • gcloud compute instances create cbareiss2 --zone us-central1-c --image-project imagesource-446419 --image linux-final
    • above is the instruction I used to create my machine
    • Id is student Password is given in class
  4. 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
  5. Following the examples in class:
    1. Create a stack implementation using a linked list
    2. Create a queue implementation using an array
    3. Use the stack and queue to covert the integer (gotten from the user or command line if you wish)
  6. Create a Software Development Report
    1. include a discussion on the fragility of your program in the security report
  7. Create a zip folder with all .c, .o, makefile, and SDR and submit it via Canvas
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine