COMP1927 14s2 COMP1927 14s2 Final Exam Computing 2
[Instructions] [C language] [Algorithms]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9]

Question 9 (3 marks)

Consider the following command to compile a program which uses Graph and Set ADTs

$ gcc  -g  -o trav  traverse.o  Graph.o  Set.o

Based on the above answer the following questions:

  1. What is the effect of the -o option in the above command?

  2. What gcc command would produce Graph.o from Graph.c?

  3. If the above program contained a function called myFun(), what would the following gdb command do:

    (gdb) break myFun
    
  4. (Bonus: worth 1 extra mark above the 90 total for the exam)

    Who is the Famous Nerd below and which sorting algorithm did he invent?

    Hint: he also invented CSP and the concept of the NULL pointer.

Type the answer to this question into the file called q9.txt and submit it using the command:

$ submit q9

The above command will make a copy of q9.txt as your answer for this question.