Skip to content

dalibran/c-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C SMC

C Programming

This repo contains all of the projects I submitted as part of my C Programming course at Santa Monica College in the Spring 2018 semester.

Testing

You can run the scripts yourself by cloning the repo to your local machine. In order to clone, type the following into your terminal:

git clone [email protected]:dalibran/C-Projects.git

Once you navigate to the repo directory, you'll have to compile the source code. In order to do this, you'll need Xcode's Command Line Tools installed. Assuming that is installed, run the following command to compile an individual project file. Here is the command for compiling the first project:

gcc -o Printing 01Printing.c

Run the object code within your terminal by executing the following command:

./Printing

Project Descriptions

Project 6

This project was an exercise in generating multidimensial arrays. I created a multidimensional array of fixed size and filled it with a random assortment of 1's and 0's. After that, I iterated through each row, summed up the contents, and assigned a parity bit based on whether the sum was odd or even.

Project4

Project 5

After generating an array and filling it with random integers, I wrote a quicksort and binary search algorithm to demonstrate the different ways of sorting an array. For the binary search, I printed each step of the search to the console as a way of visualizing how the algorithm worked.

Project4

Project 4

The goal of this project was to develop a software version of Craps, the popular casino game. After randomly generating a dice roll, I used a switch statement, coupled with recursion, to account for the various outcomes of a dice roll and continue rolling if necessary.

Project4

Project 3

I was tasked with generating an array of variable size full of random integers ranging from 10 to 90. Once generated, I created several functions to perform various actions upon the array. These functions allow me to print the array, find the maximum and minimum values, calculate the average of all values, perform a bubble sort, and find the median.

Project3

Project 2

This project focused on looping. Specifically, I was asked to print a diamond composed of my initials, where the number of the diamond's lines was determined randomly. I achieved this using several nested for-loops.

Project2

Project 1

An introduction project where we printed our initials to the console. The goal was to become familiar with the basic construction of main(), as well as printf().

About

Projects from my Spring 2018 C Programming class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages