I saw this line of code:
fputc("01234"[(int)tmp_seq[j][i]], opt->fp_bfast);
until now I thought fputc get a character and put it into the output stream.
what does this line of code does
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The code is indexing the string
"01234"to choose a character by treating the string as a character array. The index is(int)tmp_seq[j][i].Presumably
(int)tmp_seq[j][i]holds a value between0and4inclusive, otherwise there will be an array indexing out-of-bounds error.