Nth prime number using sieve of eretosthenes

i am not able to compute 5000000th prime number
my solution-https://ide.codingblocks.com/#/s/29998
question
DEEPAK AND PRIMES
Deepak is learning Sieve of Eratosthenes, He is stuck somewhere. Help him printing prime numbers.

Input Format:
Single line containing integral value n.

Constraints:
1<=n<=5000000

Output Format
Integral value denoting nth prime number.

Sample Input
1

Sample Output
2

https://ide.codingblocks.com/#/s/30010

calculate primes till 10^8. As we can not make a static array of size 10^8, make a global array.