just fixed it. so the code was wrote in wrong order and the Ternary Operator was missing a ()
void sepia(int height, int width, RGBTRIPLE image[height][width])
for (int i = 0; i < height; i++)
for (int j = 0; j < width; j++)
int sepiaBlue = round(.272 * image[i][j].rgbtRed + .534 * image[i][j].rgbtGreen + .131 *...
Actually, it's not working correctly. There's an infinite loop. It may look like it's working fine on your IDE, but try checking the file size of 049.jpg. It's growing without bound. I suspect your IDE is terminating the program when the disk space is being used up.
Take a close look at the code related to handling the EOF for the input file.
This is a strange one. Can't get it to seg fault in the IDE, but it consistently seg faults in check50. So, I embedded some printf statements in the code to track down where it is happening in check50 and looking at the output on the website link that check50 returned.
The underlying problem is with "w". Look at the declaration:
char *w[LENGTH + ...
Try this election: 3 candidates: a, b, c and 2 voters who vote for c. It reports a and b as (tied) winners. That's because c's votes are not considered in the first for (int i = 0; i < voter_count; i++), because voter_count is 2 and candidate c is index 2. (Neither is candidate c considered in the second for (int i = 0; i < voter_count; i++), for the ...