Learn how to set up your folders, write code, compile and run
TOOLS
Putty
Notepad ++
Unix
TASK 1 : INTRODUCTION
The demonstrator will take you through important information about the labs and assessments in this
subject, as well as the rules in the lab. Please take notes.
2.
3.
Tools
a.
Study Tools: Provide common tools you will use in your study. To access open the panel on
the right hand side labelled Study Tools as shown in Figure 1, a summary of each tool is
provided in Table 1.
STUDY TOOL
SUMMARY
Ask a question
FAQ for future, current and international students, phone number for ASK La Trobe and ask
a question form.
Search for Jobs
Shows how to change your student account password
Access to your email account and instructions how to access from phone, tablet, etc.
Ensure you can login and you check your email regularly!
Access to a range of tools provided by the library
Learning environment that includes your learning material and activities for each subject.
Ensure you can login and you check LMS regularly!
Download Office 365 for your home use, includes Word, Excel, OneDrive, Etc
Enrolment tools
Enroll in labs, tutorials you will be attending, and gives you your timetable.
Ensure this is done!
Explanation of Turnitin
University social media tool
Connect to wifi on campus and using eduroam
Career Hub
Change password
Email
Library
LMS
Office 365
StudentOnLine
Allocate Plus
Turnitin
UCROO
Wireless Network
b.
Campus Specific Tools: Tools that can be used across campus. Can be found in the middle
of the page.
c.
Lost on Campus: App for your phone to ensure you dont get lost on campus. Can be found
on the right hand panel
6. Save file in the created Lab0 directory (File > Save As), as helloworld.c
7. Write the code below into your file
11. In the window that appears enter your normal login information (eg. Student id or username) you
used to login to the PC (Note password will be typing even though it appears not to be). You are
now on the Unix server
12. Type ls to list the contents of the current directory. You should see similar to below, if not review
Task 2.
13. Type mkdir temp and then ls. What did this command do? What happens in your U: drive in
windows?
14. Type rmdir temp and then ls. What did this command do? What happens in your U: drive in
windows?
15. Type cd lab0 to change the current directory to lab0. Type ls and you should see similar to
below, if not review Task 2.
16. Type cd .. and then ls. What did this command do?
17. Return to the lab0 directory
18. The program is currently just text. To translate this into code, we use what is known as a
compiler. We will be using the GNU compiler known as GCC. Enter the following commands into
the command line to compile your code.
cc -Wall o helloworld helloworld.c
3. Compile the program again and you should receive the following message
This is a warning as shown by the warning keyword. This explains that the variable a is declared
but not used on line 7. The program will still compile and run.
4. Delete the line you added in step 2.
5. Add the line of code shown below
6. Compile the program again and you should receive the following message
This is an error as shown by the error keyword. This explains that there is no type named integer
and is on line 7. The program will NOT be compiled and will NOT run with errors. The
previous executable will still be able to be run however.
7. Remove the line of code added in step 5 and recompile.
ls
ls -la
cd ~
cd ..
rm indy.html
mkdir lab1
rmdir lab1
cd lab1
logout
cp file1.c file2.c
Create a new file called file2.c and copies the contents from
file1.c to file2.c