Try this change:
for (int iHist = 0; iHist < 5; iHist++) { // <= changed to <
int frequencyCount = 0; // Moved this line to be inside the loop
More Related Contents:
- What is my C code not printing # in staircase pattern, this is from hackerrank, I did not pass all test cases, but i can't point out why?
- How many times will “Hello World” be printed?
- I need help understanding this code in C [closed]
- Simple counters not working in C
- optimized sum of an array of doubles in C [duplicate]
- Variable redeclaration in c in loop and outside loop?
- Understanding Simple For Loop Code in C [closed]
- What is the difference between ++i and i++?
- Why does the order of the loops affect performance when iterating over a 2D array?
- For vs. while in C programming?
- Effect of semicolon after ‘for’ loop
- C: for loop int initial declaration
- Which ordering of nested loops for iterating over a 2D array is more efficient [duplicate]
- What is the full “for” loop syntax in C?
- How do I fix “for loop initial declaration used outside C99 mode” GCC error?
- What does a ‘for’ loop without curly braces do?
- Two semicolons inside a for-loop parentheses
- C for loop indexing: is forward-indexing faster in new CPUs?
- When implementing an infinite loop, is there a difference in using while(1) vs for(;;) vs goto (in C)?
- What’s the best way to do a reverse ‘for’ loop with an unsigned index?
- Why is int rather than unsigned int used for C and C++ for loops?
- C For loop skips first iteration and bogus number from loop scanf
- Behaviour of scanf when newline is in the format string
- Why am I getting an error while using sqrt function in c with a variable? [duplicate]
- Why is the gets function so dangerous that it should not be used?
- Creating C macro with ## and __LINE__ (token concatenation with positioning macro)
- int main() vs void main() in C [duplicate]
- How to compare double numbers?
- What is the difference between memmove and memcpy?
- Is NULL in C required/defined to be zero?