How do I convert dna from an array to complementary dna.
void print_reverse_complement(const char dna[]) {
the above function will convert DNA to Complementary DNA.. i.e A=T, C =G, G=C and T=A.
The prompt should look like:
(asks user for dna sequence and stores into array)
(prints back entered sequence)DNA sequence: ATCGGCATA
DNA complement: TAGCCGTAT
DNA reverse complement: TATGCCGAT
Then how would I do the same thing, but this time the reverse complement?
Any help would be appreciated I am stumped.
Start with a function that returns the complement of an individual nucleotide:
char complement(char nuc);
Then to print the reverse complement, Go to the end of the dna string and work your way backwards, printing hte complement of each character as you go.