a) Write a program that will determine who the killer is, by matching this fragment to the DNA of the Suspects. Note that this fragment has to match perfectly with a part of the DNA of the suspect.
fragment is GCGCA
suspect DNA is which ever string suspect array is equal to
i get the errorCode:#include <stdio.h> #include <math.h> #include <string.h> char suspect(int); int main() { char suspect[i][17]; int i=0; printf("the suspect that comitted the crime is %s",suspect[i]); } char suspect(int i) { suspect[1]="ATTCGCTTATTCCGAC"; suspect[2]="AAGCGCTAACCGCTAG"; suspect[3]="CAGCGCAAACGCCGTT"; suspect[4]="GCGCTCAAAGGCTTAA"; if(suspect[i]=="GCGCA") { return(i); } }
error C2109: subscript requires array or pointer type
where ever suspect is