I want to create a boolean array of a size which the user is going to put as input.For example - The user might put a big number like 1000000000000 ; so then I have to creat
have to create a boolean array of the size 1000000000000. The problem I am facing is , I cant store the input as int
Your problem isn't that. Your main problem is that you won't have enough memory to allocate a data structure with 1,000,000,000,000 elements (even if you overcame the limitations of int indexing).
You'll need to rethink the algorithm.