Getting started: Setting some common ground

Basically I want to check that you have an account for our server, are able to connect to it with ssh, can edit a file on the server and run some commands on the server. Furthermore, I want to checkt that submit (that is the system to hand in solutions for programming assignments) works for you.

We will do this in form of a first quiz. On this page I will state the quiz and on the next few pages I will walk you through.

Your first quiz

Once everything is setup do the following on our server theon:

  • Create a file quiz01_hello1.c with the following content:

    1
    2
    3
    4
    5
    int
    main()
    {
        puts("hello, world!");
    }
    
  • Compile this source file and run the generated executable hello1 as follows (it is intended that you see some warnings here)

    theon$ gcc -o hello1 quiz01_hello1.c
    quiz01_hello1.c: In function 'main':
    quiz01_hello1.c:4:5: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
         puts("hello, world!");
         ^~~~
    theon$ hello1
    hello, world!
    theon$ 

    Copy these commands and their resulting output (i.e. the content of this box above box) in a file quiz01_hello1.txt.

  • Create a file quiz01_hello2.c with the following content:

    1
    2
    3
    4
    5
    6
    7
    int puts(const char*);
    
    int
    main()
    {
        puts("hello, world!");
    }
    
  • Compile this source file and run the generated executable hello1 as follows

    theon$ gcc -o hello2 quiz01_hello2.c
    theon$ hello2
    hello, world!
    theon$ 

    Copy these commands and their resulting output (i.e. the content of this box above box) in a file quiz01_hello2.txt.

  • Submit the created files using the submit command as follows:

    theon$ submit hpc quiz01 quiz01_hello1.c quiz01_hello1.txt quiz01_hello2.c quiz01_hello2.txt
    submit: submissions for assignment quiz01 are not accepted.
    theon$