Info icon This preview shows pages 1–2. Sign up to view the full content.

[ INTRODUCTION TO COMPUTER SYSTEMS ] Computing Science Department Course : COMP 2130 Lab: #2 Date: 16 th /17 th January 2018 Getting started in C 1. Introduction The purpose of this assignment is to introduce C Language and to get you familiar with compiling, modifying and running C programs in our UNIX environment. 2. Instructions This lab will walk you through the very basics of C through interactive examples. The lab is designed to be a stand-alone introduction to C languages and it includes writing, modifying, and running C programs. You can use nano, pico or any other editor to write your C code. 3. Steps: 1. Use putty to login to your account. 2. Open a terminal window and create a new directory “ comp2130 ” under the desktop. Change directory to the directory cd ~/Desktop/comp2130 3. Use ls command to list all folders and files under the “ comp2130 ” directory. 4. Create a new directory “ lab2 ” and change directory to “ lab2 5. Check the version of the C compiler by running gcc -v and check the date and time of the system using the appropriate Unix command. 6. Create a new file “ hello.c ” using gedit (You can use any other editor) or nano 7. Add the following code inside the hello.c file. Then, save the file and close the editor.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '17
  • Math, editor, printf, ls command

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern