genecode[] is a 64 character array that you will use to keep track of
the 'matches' you have made. Understanding the purpose of this array is crucial to
completing the assignment. An explanation follows, but if you are unsure, get
clarification from a preceptor before writing any more code.
Each of the 64 entries in the genecode array
corresponds to one of the 3-character codons.
Ideally, you would like to be able to use genecode["att"] to
access the array value corresponding to the codon att.
Unfortunately, C requires that array indices be integers. This was the
whole purpose of the code and decode functions - so that you
can use codons to index the array. To access the array element
corresponding to the codon att, use genecode[code("att")].
This is the same as genecode[15], which is now valid C.
Similarly, genecode[0] corresponds
to the codon "aaa", genecode[1] corresponds to the
codon "aac", and so on.
Each element of the genecode array holds a single character:
a capital letters corresponding to one of the 25 amino acids. Whenever
you store an amino acid
in the genecode array, you are matching a codon with
an amino acid. For example, setting genecode[15] = 'E' says
that the amino acid 'E' is encoded by the codon "att". The goal
of this assignment is to find a consistent matching of codons to amino
acids, and produce a table like
gene.3.ans.