Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

n molecular biology the \"alphabet\" of genes consists of four chemicals (called

ID: 3659815 • Letter: N

Question

n molecular biology the "alphabet" of genes consists of four chemicals (called nucleotides) represented by the letters A C G T. A triad is a sequence of three nucleotides (for example AGA) and specifies an amino acid, a building block for proteins. A gene consists of a very, very long sequence of A-C-G-T combinations. Assume the input consists of a long sequence of A-C-G-T letters representing a gene. Write the code necessary to skip over the first 7 letters and then read the next 4 triads, printing each out on its own line.

Explanation / Answer

C - CODE

#include<stdio.h>


void triad(char* genome){

  char *p; p = genome + 7;

  int i = 0;

for (i=0;i<4;i++){

printf("%c%c%c ",p[0],p[1],p[2]);

p+=3;

}
}
int main(){

  char str[80] = "agcttacagctattagctagcttagagacc";

triad(str);

return 0;

}