Creating your First C Program

Objective: At the conclusion of this lab the student will be able to compile and run a C program.

Resources required:

Hardware: XenDesktop or Classroom computer

Software: Dev C++

Instructions

Step 1

Go to the Course Information area of our course and either download Dev C++ or use the Xendesktop to access the application.  You will also find resources in this area.

Step 2

Open Dev C++ and create a new source file. Type the code shown above into your Dev C++ Program on the Compile & Run. Make sure that your output details box is open so that you can see where any errors may have occurred.  See screen shot below:

Important: Don’t try to copy and paste code from Word or other programs into Flowgorithm or Dev C++, because these applications may handle certain characters differently from your source document. It is important that you either copy the code from a text file (Notepad or Wordpad) or you type the code manually.

Step 3

Compile and run the program.  If you receive errors, correct them until the program runs correctly. You will take a screenshot of your entire output screen to submit for grading. See below for example:

Submission Instructions

Upload your .c file and a screen shot of your code output saved in a Word document including the path name directory at the top of the screen into the dropbox for grading.