the problem states that there can be up to 10^6 (1000000) entries.
Your code is only allowing for 20 entries.
The code seems to work for small numbers of numbers.
Suggest just change a[20]
to a[1000000]
More Related Contents:
- How do I make this Linux program compile? [closed]
- Update a struct in Arduino
- Why My DeCompression is showing an Error?
- How do I determine the size of my array in C?
- fgets doesn’t work after scanf [duplicate]
- What registers to save in the ARM C calling convention?
- How to read the content of a file to a string in C?
- Can a const variable be used to declare the size of an array in C?
- Why do pthreads’ condition variable functions require a mutex?
- How do you make an array of structs in C?
- What is the point of header files in C? [duplicate]
- Function pointer cast to different signature
- __attribute__((const)) vs __attribute__((pure)) in GNU C
- Replacement of fflush(stdin)
- calculating double integrals in R quickly
- What are function pointers used for, and how would I use them?
- How to build x86 and/or x64 on Windows from command line with CMAKE?
- Understanding concurrent file writes from multiple processes
- in c: func(void) vs. func() [duplicate]
- How to remove all occurrences of a given character from string in C?
- Doesn’t a 2D array decay to pointer to pointer
- Static vs global
- Best timing method in C?
- Order of execution for an if with multiple conditionals
- Does pow() work for int data type in C? [duplicate]
- What is the easiest way to count the newlines in an ASCII file?
- Printf long long int in C with GCC?
- What precisely does the %g printf specifier mean?
- C the same global variable defined in different files
- Where can I find system call source code?