which accepts an integer of arbitary length as an input and takes maximum polynomial time to execute , let us define a language L= {n | P does not crash for any input of size n}
How is easy or difficult to prove that L belongs to NP ?

what is N ??

It is the input.

This question has nothing to do with C++. It belongs in the Computer Science forum (which includes Theory of Computation).

You might want to read up on NP complexity at Wikipedia.