User Tools

Site Tools


blog:spring2016:jschuma1:start

Justyn Schumaker's spring2016 Opus

Introduction

In this space you can provide a description of yourself, your pursuits, your interests. To fill out this section, click the edit button off to the right, delete this placement text, and type your original content.

C/C++ Programming Journal

February 8, 2016

This week we discussed the topics of input and output functions within the C language. Also, we learned about the many important uses for the memory allocation commands within C. (and with memory allocation came an entire lecture day from Joe about the many joys and wonders). Finally we discussed the importance of loop statements and how we can use them to write and infinite block of code within a few lines.

The main input function that is used with C is the command fprintf(), this allows a user to “read in” any information that a user types on the keyboard. This is a valuable command as it grants freedom and individuality to the user by the program. Also, you can do cool things with it like make our (soon to be) multi-million dollar number guess game on steam.

Going hand in hand with the input functions are the output functions. The main output function that we use in C is the fprintf() command structure. Most commonly we use fprintf(stdout, “[insert text here]”) which prints out whatever is within the double quotation mark. This allowed us to display text to the user within our (soon to be) multi-million dollar game.

Finally, we went over and discussed how to use loop statements.This is probably one of the most important aspects to any coding language as it allows the ability to shrink would normally be a, potentially, infinite block of code down into just a few lines that accomplishes the same, or more, purposes. We used these in our next big hit game to continually prompt the user to guess a number an infinite amount of times.

One of the biggest problems that I am having with this weeks projects (as with most coding problems) is converting what I have in my head into the proper language and orientation for the machine to read.

blog/spring2016/jschuma1/start.txt · Last modified: 2016/01/18 16:05 by 127.0.0.1